🐛 Fix fab menu wrong type

This commit is contained in:
2025-10-31 19:09:24 +08:00
parent d28c11940d
commit b3ef7d6ad0
3 changed files with 11 additions and 17 deletions

View File

@@ -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 = "<group>";
};
@@ -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";

View File

@@ -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;
}
});
};
}, []);

View File

@@ -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;
}
});
};
}, []);