From b3ef7d6ad0b7f50842af5528b7ecce8a1efd59ac Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 31 Oct 2025 19:09:24 +0800 Subject: [PATCH] :bug: Fix fab menu wrong type --- ios/Runner.xcodeproj/project.pbxproj | 16 +++------------- lib/screens/chat/chat.dart | 6 ++++-- lib/screens/realm/realms.dart | 6 ++++-- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 621a4635..bdb34f6a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 77; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -182,6 +182,8 @@ /* Begin PBXFileSystemSynchronizedRootGroup section */ 7310A7D52EB10962002C0FD3 /* WatchRunner Watch App */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + ); path = "WatchRunner Watch App"; sourceTree = ""; }; @@ -669,14 +671,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; @@ -734,14 +732,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; @@ -770,14 +764,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks.sh\"\n"; diff --git a/lib/screens/chat/chat.dart b/lib/screens/chat/chat.dart index e9735092..ef53bf6f 100644 --- a/lib/screens/chat/chat.dart +++ b/lib/screens/chat/chat.dart @@ -348,13 +348,15 @@ class ChatListScreen extends HookConsumerWidget { useEffect(() { // Set FAB type to chat final fabMenuNotifier = ref.read(fabMenuTypeProvider.notifier); - WidgetsBinding.instance.addPostFrameCallback((_) { + Future(() { fabMenuNotifier.state = FabMenuType.chat; }); return () { // Clean up: reset FAB type to main WidgetsBinding.instance.addPostFrameCallback((_) { - fabMenuNotifier.state = FabMenuType.main; + if (fabMenuNotifier.state == FabMenuType.chat) { + fabMenuNotifier.state = FabMenuType.main; + } }); }; }, []); diff --git a/lib/screens/realm/realms.dart b/lib/screens/realm/realms.dart index eb21c097..f5f25a02 100644 --- a/lib/screens/realm/realms.dart +++ b/lib/screens/realm/realms.dart @@ -46,13 +46,15 @@ class RealmListScreen extends HookConsumerWidget { useEffect(() { // Set FAB type to realm final fabMenuNotifier = ref.read(fabMenuTypeProvider.notifier); - WidgetsBinding.instance.addPostFrameCallback((_) { + Future(() { fabMenuNotifier.state = FabMenuType.realm; }); return () { // Clean up: reset FAB type to main WidgetsBinding.instance.addPostFrameCallback((_) { - fabMenuNotifier.state = FabMenuType.main; + if (fabMenuNotifier.state == FabMenuType.realm) { + fabMenuNotifier.state = FabMenuType.main; + } }); }; }, []);