refactor: update formatting

This commit is contained in:
edde746
2025-12-15 02:29:03 +01:00
parent e072960d36
commit 3c89d0eba8
175 changed files with 14599 additions and 15569 deletions
+3 -8
View File
@@ -14,8 +14,7 @@ class OfflineModeProvider extends ChangeNotifier {
late bool _hasServerConnection;
bool _isInitialized = false;
OfflineModeProvider(this._serverManager)
: _hasServerConnection = _serverManager.onlineServerIds.isNotEmpty;
OfflineModeProvider(this._serverManager) : _hasServerConnection = _serverManager.onlineServerIds.isNotEmpty;
/// Whether the app is currently in offline mode
/// Offline = no network OR no servers reachable
@@ -30,9 +29,7 @@ class OfflineModeProvider extends ChangeNotifier {
/// Updates network and server connection flags
Future<void> _updateConnectionFlags() async {
final connectivityResult = await Connectivity().checkConnectivity();
_hasNetworkConnection = !connectivityResult.contains(
ConnectivityResult.none,
);
_hasNetworkConnection = !connectivityResult.contains(ConnectivityResult.none);
_hasServerConnection = _serverManager.onlineServerIds.isNotEmpty;
}
@@ -45,9 +42,7 @@ class OfflineModeProvider extends ChangeNotifier {
await _updateConnectionFlags();
// Monitor connectivity changes
_connectivitySubscription = Connectivity().onConnectivityChanged.listen((
results,
) {
_connectivitySubscription = Connectivity().onConnectivityChanged.listen((results) {
final wasOffline = isOffline;
_hasNetworkConnection = !results.contains(ConnectivityResult.none);