diff --git a/lib/service/connectivity.dart b/lib/service/connectivity.dart index 3579c740..84f119dd 100644 --- a/lib/service/connectivity.dart +++ b/lib/service/connectivity.dart @@ -4,7 +4,6 @@ import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:get_it/get_it.dart'; import 'package:logging/logging.dart'; import 'package:meta/meta.dart'; -import 'package:moxxyv2/service/connectivity_watcher.dart'; import 'package:moxxyv2/service/httpfiletransfer/httpfiletransfer.dart'; import 'package:moxxyv2/service/moxxmpp/reconnect.dart'; import 'package:moxxyv2/xmpp/connection.dart'; @@ -42,8 +41,6 @@ class ConnectivityService { .onConnectivityChanged(regained, lost); GetIt.I.get().onConnectivityChanged(regained); - - GetIt.I.get().onConnectivityChanged(regained); }); } diff --git a/lib/service/connectivity_watcher.dart b/lib/service/connectivity_watcher.dart index 318cc141..8a10dc30 100644 --- a/lib/service/connectivity_watcher.dart +++ b/lib/service/connectivity_watcher.dart @@ -36,14 +36,6 @@ class ConnectivityWatcherService { _stopTimer(); _timer = Timer(const Duration(minutes: 30), _onTimerElapsed); } - - /// Called when the network state changed - Future onConnectivityChanged(bool regained) async { - if (regained) { - _log.finest('Regained network connection. Starting warning timer...'); - _startTimer(); - } - } /// Called when the XMPP connection state changed Future onConnectionStateChanged(XmppConnectionState before, XmppConnectionState current) async {