From 4595865ad3ff386aae8f7cfcfe1598e86893f385 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 15 Oct 2025 22:49:43 +0800 Subject: [PATCH] :bug: Bug fixes on windows --- lib/widgets/app_scaffold.dart | 6 +++--- lib/widgets/chat/message_item.dart | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/widgets/app_scaffold.dart b/lib/widgets/app_scaffold.dart index 395cacfa..6402a1e1 100644 --- a/lib/widgets/app_scaffold.dart +++ b/lib/widgets/app_scaffold.dart @@ -374,10 +374,10 @@ class PageBackButton extends StatelessWidget { @override Widget build(BuildContext context) { - final isDesktop = - !kIsWeb && (Platform.isMacOS || Platform.isLinux || Platform.isWindows); + final hasPageAction = + !kIsWeb && Platform.isMacOS; - if (isDesktop && isWideScreen(context)) return const SizedBox.shrink(); + if (hasPageAction && isWideScreen(context)) return const SizedBox.shrink(); return IconButton( onPressed: () { diff --git a/lib/widgets/chat/message_item.dart b/lib/widgets/chat/message_item.dart index c2b3cc73..7b158e9a 100644 --- a/lib/widgets/chat/message_item.dart +++ b/lib/widgets/chat/message_item.dart @@ -14,7 +14,6 @@ import 'package:island/pods/chat/messages_notifier.dart'; import 'package:island/pods/translate.dart'; import 'package:island/pods/config.dart'; import 'package:island/widgets/account/account_pfc.dart'; -import 'package:island/widgets/app_scaffold.dart'; import 'package:island/widgets/chat/message_content.dart'; import 'package:island/widgets/chat/message_indicators.dart'; import 'package:island/widgets/chat/message_sender_info.dart'; @@ -666,17 +665,11 @@ class MessageItemDisplayBubble extends HookConsumerWidget { ? Theme.of(context).colorScheme.primaryContainer.withOpacity(0.5) : Theme.of(context).colorScheme.surfaceContainer; - final hasBackground = - ref.watch(backgroundImageFileProvider).valueOrNull != null; - final remoteMessage = message.toRemoteMessage(); final sender = remoteMessage.sender; return Material( - color: - hasBackground - ? Colors.transparent - : Theme.of(context).colorScheme.surface, + color: Colors.transparent, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4), child: Column(