Compare commits

...

2 Commits

Author SHA1 Message Date
001549b190 💄 Fix notification bottom sheet covered with sheet 2025-10-15 22:55:37 +08:00
4595865ad3 🐛 Bug fixes on windows 2025-10-15 22:49:43 +08:00
6 changed files with 10 additions and 21 deletions

View File

@@ -25,7 +25,6 @@ import 'package:island/screens/tabs.dart';
import 'package:island/screens/explore.dart'; import 'package:island/screens/explore.dart';
import 'package:island/screens/discovery/article_detail.dart'; import 'package:island/screens/discovery/article_detail.dart';
import 'package:island/screens/account.dart'; import 'package:island/screens/account.dart';
import 'package:island/screens/notification.dart';
import 'package:island/screens/wallet.dart'; import 'package:island/screens/wallet.dart';
import 'package:island/screens/account/relationship.dart'; import 'package:island/screens/account/relationship.dart';
import 'package:island/screens/account/profile.dart'; import 'package:island/screens/account/profile.dart';
@@ -392,11 +391,6 @@ final routerProvider = Provider<GoRouter>((ref) {
), ),
], ],
), ),
GoRoute(
name: 'notifications',
path: '/account/notifications',
builder: (context, state) => const NotificationScreen(),
),
GoRoute( GoRoute(
name: 'wallet', name: 'wallet',
path: '/account/wallet', path: '/account/wallet',

View File

@@ -285,7 +285,8 @@ class AccountScreen extends HookConsumerWidget {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
builder: (context) => const NotificationScreen(), useRootNavigator: true,
builder: (context) => const NotificationSheet(),
); );
}, },
), ),

View File

@@ -57,7 +57,8 @@ Widget notificationIndicatorWidget(
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
builder: (context) => const NotificationScreen(), useRootNavigator: true,
builder: (context) => const NotificationSheet(),
); );
}, },
), ),

View File

@@ -112,8 +112,8 @@ class NotificationListNotifier extends _$NotificationListNotifier
} }
} }
class NotificationScreen extends HookConsumerWidget { class NotificationSheet extends HookConsumerWidget {
const NotificationScreen({super.key}); const NotificationSheet({super.key});
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {

View File

@@ -374,10 +374,10 @@ class PageBackButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final isDesktop = final hasPageAction =
!kIsWeb && (Platform.isMacOS || Platform.isLinux || Platform.isWindows); !kIsWeb && Platform.isMacOS;
if (isDesktop && isWideScreen(context)) return const SizedBox.shrink(); if (hasPageAction && isWideScreen(context)) return const SizedBox.shrink();
return IconButton( return IconButton(
onPressed: () { onPressed: () {

View File

@@ -14,7 +14,6 @@ import 'package:island/pods/chat/messages_notifier.dart';
import 'package:island/pods/translate.dart'; import 'package:island/pods/translate.dart';
import 'package:island/pods/config.dart'; import 'package:island/pods/config.dart';
import 'package:island/widgets/account/account_pfc.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_content.dart';
import 'package:island/widgets/chat/message_indicators.dart'; import 'package:island/widgets/chat/message_indicators.dart';
import 'package:island/widgets/chat/message_sender_info.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.primaryContainer.withOpacity(0.5)
: Theme.of(context).colorScheme.surfaceContainer; : Theme.of(context).colorScheme.surfaceContainer;
final hasBackground =
ref.watch(backgroundImageFileProvider).valueOrNull != null;
final remoteMessage = message.toRemoteMessage(); final remoteMessage = message.toRemoteMessage();
final sender = remoteMessage.sender; final sender = remoteMessage.sender;
return Material( return Material(
color: color: Colors.transparent,
hasBackground
? Colors.transparent
: Theme.of(context).colorScheme.surface,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: Column( child: Column(