From b15f6450bd4dd952952fd972fa972a409cbee314 Mon Sep 17 00:00:00 2001 From: ericz Date: Tue, 4 Aug 2026 17:27:51 +0200 Subject: [PATCH] dart format --- lib/models/app_settings.dart | 6 ++---- lib/screens/app_settings_screen.dart | 4 +--- lib/screens/channel_chat_screen.dart | 18 ++++++------------ lib/screens/channels_screen.dart | 3 ++- test/models/model_changes_test.dart | 1 - test/screens/path_trace_test.dart | 10 +++++++--- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/lib/models/app_settings.dart b/lib/models/app_settings.dart index a6f82100..82d570c7 100644 --- a/lib/models/app_settings.dart +++ b/lib/models/app_settings.dart @@ -76,8 +76,7 @@ class Cyr2LatProfile { class AppSettings { static const Object _unset = Object(); - static const String stadiaDemo = - '51bd0381-4685-4666-bae8-48940f6d77c0'; + static const String stadiaDemo = '51bd0381-4685-4666-bae8-48940f6d77c0'; final bool clearPathOnMaxRetry; final bool mapShowRepeaters; @@ -137,8 +136,7 @@ class AppSettings { return apiKey; } - bool get usesstadiaDemo => - effectiveMapTileApiKey == stadiaDemo; + bool get usesstadiaDemo => effectiveMapTileApiKey == stadiaDemo; Map get cyr2latCharMap { final profile = cyr2latProfiles.firstWhere( diff --git a/lib/screens/app_settings_screen.dart b/lib/screens/app_settings_screen.dart index 90a0a132..8405beca 100644 --- a/lib/screens/app_settings_screen.dart +++ b/lib/screens/app_settings_screen.dart @@ -1153,9 +1153,7 @@ class AppSettingsScreen extends StatelessWidget { ) { final currentApiKey = settingsService.settings.mapTileApiKey?.trim() ?? ''; final maskedApiKey = _maskApiKey( - currentApiKey.isEmpty - ? AppSettings.stadiaDemo - : currentApiKey, + currentApiKey.isEmpty ? AppSettings.stadiaDemo : currentApiKey, ); final controller = TextEditingController(text: maskedApiKey); showDialog( diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index ce170aed..2e7c3b68 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -700,9 +700,9 @@ class _ChannelChatScreenState extends State { child: Text( context.l10n.channels_via( _formatPathPrefixes( - displayPath, - displayPathHashWidth, - ), + displayPath, + displayPathHashWidth, + ), ), style: MeshTheme.mono( fontSize: 9.5 * textScale, @@ -1214,25 +1214,19 @@ class _ChannelChatScreenState extends State { decoration: InputDecoration( hintText: context.l10n.chat_typeMessage, border: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.outlineVariant, ), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.outlineVariant, ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.primary, width: 1.5, diff --git a/lib/screens/channels_screen.dart b/lib/screens/channels_screen.dart index fb5039d2..1867f5de 100644 --- a/lib/screens/channels_screen.dart +++ b/lib/screens/channels_screen.dart @@ -412,7 +412,8 @@ class _ChannelsScreenState extends State final messages = connector.getChannelMessages(channel); final lastMessage = messages.isNotEmpty ? messages.last : null; final lastMessageText = lastMessage?.text ?? ''; - final lastPreview = lastMessageText.isNotEmpty && + final lastPreview = + lastMessageText.isNotEmpty && GifHelper.parseGif(lastMessageText) != null ? context.l10n.chat_receivedGif : lastMessageText; diff --git a/test/models/model_changes_test.dart b/test/models/model_changes_test.dart index cc218c95..c91a9c73 100644 --- a/test/models/model_changes_test.dart +++ b/test/models/model_changes_test.dart @@ -643,7 +643,6 @@ void main() { expect(contacts.first.path, equals(Uint8List.fromList([0x11, 0x22]))); }, ); - }); group('AppSettingsService — gps interval fallback', () { diff --git a/test/screens/path_trace_test.dart b/test/screens/path_trace_test.dart index 1ac2a1ca..74b2b37a 100644 --- a/test/screens/path_trace_test.dart +++ b/test/screens/path_trace_test.dart @@ -22,7 +22,8 @@ class _FakeStorageService extends StorageService { ContactPathHistory history, ) async {} @override - Future loadPathHistory(String contactPubKeyHex) async => null; + Future loadPathHistory(String contactPubKeyHex) async => + null; @override Future clearPathHistory(String contactPubKeyHex) async {} } @@ -76,9 +77,12 @@ Widget _buildTestApp({ return MultiProvider( providers: [ ChangeNotifierProvider.value(value: connector), - ChangeNotifierProvider.value(value: appSettingsService), + ChangeNotifierProvider.value( + value: appSettingsService, + ), ChangeNotifierProvider( - create: (_) => MapTileCacheService(appSettingsService: appSettingsService), + create: (_) => + MapTileCacheService(appSettingsService: appSettingsService), ), ChangeNotifierProvider( create: (_) => PathHistoryService(_FakeStorageService()),