Wunderfitz/harbour-fernschreiber

call setNetworkType on &QNetworkConfigurationManager::configurationChanged

Closed this issue · 0 comments

It seems to me that setting the specific NetworkTypes themselves aren't very useful for the application, but it's recommended to call setNetworkType when the connection changes – so we may as well set the right type.

It doesn't require auth, so that should make things easier and even more useful.

Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics.

https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1set_network_type.html

https://github.com/Wunderfitz/harbour-piepmatz/blob/master/src/accountmodel.cpp#L95