diff --git a/lib/screens/explore.dart b/lib/screens/explore.dart index 542810e..b5af07c 100644 --- a/lib/screens/explore.dart +++ b/lib/screens/explore.dart @@ -224,55 +224,47 @@ class _ExploreScreenState extends State title: Row( children: [ IconButton( - padding: EdgeInsets.zero, - constraints: const BoxConstraints(), - visualDensity: VisualDensity.compact, - icon: _listKey.currentState?.realm != null - ? AccountImage( - content: _listKey.currentState!.realm!.avatar, - radius: 18, - ) - : const Icon(Symbols.group), - onPressed: () { - showModalBottomSheet( - context: context, - builder: (context) => _PostListRealmPopup( - realms: _realms, - onUpdate: (realm) { - _listKey.currentState?.setRealm(realm); - _listKey.currentState?.refreshPosts(); - Future.delayed(const Duration(milliseconds: 100), - () { - if (mounted) { - setState(() {}); - } - }); - }, - ), - ); - }, - ), - IconButton( - icon: const Icon(Symbols.category), - style: _showCategories - ? ButtonStyle( - foregroundColor: WidgetStateProperty.all( - Theme.of(context).colorScheme.primary, - ), - backgroundColor: MaterialStateProperty.all( - Theme.of(context) - .colorScheme - .secondaryContainer, - ), - ) - : null, - onPressed: () { - _toggleShowCategories(); - }, + icon: const Icon(Symbols.shuffle), + onPressed: () {}, ), Expanded( child: Center( - child: Text('screenExplore').tr(), + child: IconButton( + padding: EdgeInsets.zero, + constraints: const BoxConstraints(), + visualDensity: VisualDensity.compact, + icon: _listKey.currentState?.realm != null + ? AccountImage( + content: _listKey.currentState!.realm!.avatar, + radius: 18, + ) + : Image.asset( + 'assets/icon/icon-dark.png', + width: 36, + height: 36, + color: Theme.of(context) + .appBarTheme + .foregroundColor, + ), + onPressed: () { + showModalBottomSheet( + context: context, + builder: (context) => _PostListRealmPopup( + realms: _realms, + onUpdate: (realm) { + _listKey.currentState?.setRealm(realm); + _listKey.currentState?.refreshPosts(); + Future.delayed( + const Duration(milliseconds: 100), () { + if (mounted) { + setState(() {}); + } + }); + }, + ), + ); + }, + ), ), ), ], @@ -280,6 +272,22 @@ class _ExploreScreenState extends State floating: true, snap: true, actions: [ + IconButton( + icon: const Icon(Symbols.category), + style: _showCategories + ? ButtonStyle( + foregroundColor: WidgetStateProperty.all( + Theme.of(context).colorScheme.primary, + ), + backgroundColor: MaterialStateProperty.all( + Theme.of(context).colorScheme.secondaryContainer, + ), + ) + : null, + onPressed: () { + _toggleShowCategories(); + }, + ), IconButton( icon: const Icon(Symbols.search), onPressed: () { @@ -300,11 +308,12 @@ class _ExploreScreenState extends State crossAxisAlignment: CrossAxisAlignment.center, children: [ Icon( - kCategoryIcons[category.alias] ?? - Symbols.question_mark, - color: Theme.of(context) - .appBarTheme - .foregroundColor!), + kCategoryIcons[category.alias] ?? + Symbols.question_mark, + color: Theme.of(context) + .appBarTheme + .foregroundColor!, + ), const Gap(8), Flexible( child: Text( diff --git a/lib/widgets/chat/chat_message.dart b/lib/widgets/chat/chat_message.dart index 309d50d..8739d98 100644 --- a/lib/widgets/chat/chat_message.dart +++ b/lib/widgets/chat/chat_message.dart @@ -214,7 +214,8 @@ class ChatMessage extends StatelessWidget { data.type == 'messages.new' && (data.body['text']?.isNotEmpty ?? false) && (cfg.prefs.getBool(kAppExpandChatLink) ?? true)) - LinkPreviewWidget(text: data.body['text']!).padding(left: 48), + LinkPreviewWidget(text: data.body['text']!) + .padding(left: isCompact ? 0 : 48), if (data.preload?.attachments?.isNotEmpty ?? false) AttachmentList( data: data.preload!.attachments!, diff --git a/pubspec.lock b/pubspec.lock index b59ba84..9494ad9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: built_value - sha256: "8b158ab94ec6913e480dc3f752418348b5ae099eb75868b5f4775f0572999c61" + sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 url: "https://pub.dev" source: hosted - version: "8.9.4" + version: "8.9.5" cached_network_image: dependency: "direct main" description: @@ -301,10 +301,10 @@ packages: dependency: "direct main" description: name: croppy - sha256: bf99b00023df0d7d047e04d27d496d87cbefd968f578d0bd30f342ff75570a12 + sha256: "99f4fbb4a4b44d2712e8dcd61c57c1acac151bd53cab11de3babec80407ed266" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.5" cross_file: dependency: "direct main" description: @@ -429,18 +429,18 @@ packages: dependency: "direct main" description: name: drift - sha256: "97d5832657d49f26e7a8e07de397ddc63790b039372878d5117af816d0fdb5cb" + sha256: "14a61af39d4584faf1d73b5b35e4b758a43008cf4c0fdb0576ec8e7032c0d9a5" url: "https://pub.dev" source: hosted - version: "2.25.1" + version: "2.26.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: f1db88482dbb016b9bbddddf746d5d0a6938b156ff20e07320052981f97388cc + sha256: "0d3f8b33b76cf1c6a82ee34d9511c40957549c4674b8f1688609e6d6c7306588" url: "https://pub.dev" source: hosted - version: "2.25.2" + version: "2.26.0" drift_flutter: dependency: "direct main" description: @@ -710,6 +710,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.4.1" + flutter_card_swiper: + dependency: "direct main" + description: + name: flutter_card_swiper + sha256: "1eacbfab31b572223042e03409726553aec431abe48af48c8d591d376d070d3d" + url: "https://pub.dev" + source: hosted + version: "7.0.2" flutter_colorpicker: dependency: "direct main" description: @@ -831,10 +839,10 @@ packages: dependency: "direct main" description: name: flutter_map - sha256: bbf145e8220531f2f727608c431871c7457f3b134e513543913afd00fdc1cd47 + sha256: f7d0379477274f323c3f3bc12d369a2b42eb86d1e7bd2970ae1ea3cff782449a url: "https://pub.dev" source: hosted - version: "8.1.0" + version: "8.1.1" flutter_markdown: dependency: "direct main" description: @@ -1177,10 +1185,10 @@ packages: dependency: "direct main" description: name: image_picker_android - sha256: "82652a75e3dd667a91187769a6a2cc81bd8c111bbead698d8e938d2b63e5e89a" + sha256: "8bd392ba8b0c8957a157ae0dc9fcf48c58e6c20908d5880aea1d79734df090e9" url: "https://pub.dev" source: hosted - version: "0.8.12+21" + version: "0.8.12+22" image_picker_for_web: dependency: transitive description: @@ -1409,10 +1417,10 @@ packages: dependency: "direct main" description: name: material_symbols_icons - sha256: "1403944c2a68dbdf934fca2b2115a372e70a4a185c136ab71a9d16e2108d0b14" + sha256: ca30ccbd97763353bde6bb1076aa4f4d17a40db0804384da77df142102aa225d url: "https://pub.dev" source: hosted - version: "4.2805.1" + version: "4.2808.0" media_kit: dependency: "direct main" description: @@ -1601,10 +1609,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" + sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" url: "https://pub.dev" source: hosted - version: "2.2.15" + version: "2.2.16" path_provider_foundation: dependency: transitive description: @@ -1785,10 +1793,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.2.0" pubspec_parse: dependency: transitive description: @@ -1953,10 +1961,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: a768fc8ede5f0c8e6150476e14f38e2417c0864ca36bb4582be8e21925a03c22 + sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.8" shared_preferences_foundation: dependency: transitive description: @@ -2118,10 +2126,10 @@ packages: dependency: transitive description: name: sqlite3 - sha256: "32b632dda27d664f85520093ed6f735ae5c49b5b75345afb8b19411bc59bb53d" + sha256: "310af39c40dd0bb2058538333c9d9840a2725ae0b9f77e4fd09ad6696aa8f66e" url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.7.5" sqlite3_flutter_libs: dependency: transitive description: @@ -2326,10 +2334,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" + sha256: "1d0eae19bd7606ef60fe69ef3b312a437a16549476c42321d5dc1506c9ca3bf4" url: "https://pub.dev" source: hosted - version: "6.3.14" + version: "6.3.15" url_launcher_ios: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 500efae..1dc9d20 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -138,6 +138,7 @@ dependencies: flutter_map: ^8.1.0 geolocator: ^13.0.2 fast_rsa: ^3.8.0 + flutter_card_swiper: ^7.0.2 dev_dependencies: flutter_test: