🐛 Bug fixes
This commit is contained in:
		@@ -62,3 +62,9 @@ If you want to build the release version, use the flutter build command. Learn m
 | 
				
			|||||||
```bash
 | 
					```bash
 | 
				
			||||||
flutter build <platform>
 | 
					flutter build <platform>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Known Issues
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Due to the issues with the flutter build tools, [see](https://github.com/flutter/flutter/issues/160622).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Since there is a watchOS app for iOS, you're unable to use the flutter cli to run iOS app. Use xcode instead.
 | 
				
			||||||
@@ -571,6 +571,6 @@ SPEC CHECKSUMS:
 | 
				
			|||||||
  wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
 | 
					  wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
 | 
				
			||||||
  WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
 | 
					  WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PODFILE CHECKSUM: 9924dcd1590471adb798f3a0876bedd6a65ea145
 | 
					PODFILE CHECKSUM: 34a6810e5629b6394fac3c1a962f601a58f86cb2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COCOAPODS: 1.16.2
 | 
					COCOAPODS: 1.16.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
	archiveVersion = 1;
 | 
						archiveVersion = 1;
 | 
				
			||||||
	classes = {
 | 
						classes = {
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	objectVersion = 54;
 | 
						objectVersion = 77;
 | 
				
			||||||
	objects = {
 | 
						objects = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Begin PBXBuildFile section */
 | 
					/* Begin PBXBuildFile section */
 | 
				
			||||||
@@ -182,8 +182,6 @@
 | 
				
			|||||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
 | 
					/* Begin PBXFileSystemSynchronizedRootGroup section */
 | 
				
			||||||
		7310A7D52EB10962002C0FD3 /* WatchRunner Watch App */ = {
 | 
							7310A7D52EB10962002C0FD3 /* WatchRunner Watch App */ = {
 | 
				
			||||||
			isa = PBXFileSystemSynchronizedRootGroup;
 | 
								isa = PBXFileSystemSynchronizedRootGroup;
 | 
				
			||||||
			exceptions = (
 | 
					 | 
				
			||||||
			);
 | 
					 | 
				
			||||||
			path = "WatchRunner Watch App";
 | 
								path = "WatchRunner Watch App";
 | 
				
			||||||
			sourceTree = "<group>";
 | 
								sourceTree = "<group>";
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
@@ -671,10 +669,14 @@
 | 
				
			|||||||
			inputFileListPaths = (
 | 
								inputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								inputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			name = "[CP] Copy Pods Resources";
 | 
								name = "[CP] Copy Pods Resources";
 | 
				
			||||||
			outputFileListPaths = (
 | 
								outputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								outputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			runOnlyForDeploymentPostprocessing = 0;
 | 
								runOnlyForDeploymentPostprocessing = 0;
 | 
				
			||||||
			shellPath = /bin/sh;
 | 
								shellPath = /bin/sh;
 | 
				
			||||||
			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
 | 
								shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
 | 
				
			||||||
@@ -732,10 +734,14 @@
 | 
				
			|||||||
			inputFileListPaths = (
 | 
								inputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								inputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			name = "[CP] Embed Pods Frameworks";
 | 
								name = "[CP] Embed Pods Frameworks";
 | 
				
			||||||
			outputFileListPaths = (
 | 
								outputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								outputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			runOnlyForDeploymentPostprocessing = 0;
 | 
								runOnlyForDeploymentPostprocessing = 0;
 | 
				
			||||||
			shellPath = /bin/sh;
 | 
								shellPath = /bin/sh;
 | 
				
			||||||
			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
 | 
								shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
 | 
				
			||||||
@@ -764,10 +770,14 @@
 | 
				
			|||||||
			inputFileListPaths = (
 | 
								inputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								inputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			name = "[CP] Embed Pods Frameworks";
 | 
								name = "[CP] Embed Pods Frameworks";
 | 
				
			||||||
			outputFileListPaths = (
 | 
								outputFileListPaths = (
 | 
				
			||||||
				"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 | 
									"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
 | 
								outputPaths = (
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
			runOnlyForDeploymentPostprocessing = 0;
 | 
								runOnlyForDeploymentPostprocessing = 0;
 | 
				
			||||||
			shellPath = /bin/sh;
 | 
								shellPath = /bin/sh;
 | 
				
			||||||
			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks.sh\"\n";
 | 
								shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WatchRunner Watch App/Pods-WatchRunner Watch App-frameworks.sh\"\n";
 | 
				
			||||||
@@ -1006,6 +1016,7 @@
 | 
				
			|||||||
				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 | 
									SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 | 
				
			||||||
				SWIFT_VERSION = 5.0;
 | 
									SWIFT_VERSION = 5.0;
 | 
				
			||||||
				VERSIONING_SYSTEM = "apple-generic";
 | 
									VERSIONING_SYSTEM = "apple-generic";
 | 
				
			||||||
 | 
									WATCHOS_DEPLOYMENT_TARGET = 11.6;
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			name = Profile;
 | 
								name = Profile;
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
@@ -1086,6 +1097,7 @@
 | 
				
			|||||||
				INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
									INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
				
			||||||
				INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
									INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
				
			||||||
				INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
									INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
				
			||||||
 | 
									IPHONEOS_DEPLOYMENT_TARGET = 16.6;
 | 
				
			||||||
				LD_RUNPATH_SEARCH_PATHS = (
 | 
									LD_RUNPATH_SEARCH_PATHS = (
 | 
				
			||||||
					"$(inherited)",
 | 
										"$(inherited)",
 | 
				
			||||||
					"@executable_path/Frameworks",
 | 
										"@executable_path/Frameworks",
 | 
				
			||||||
@@ -1135,6 +1147,7 @@
 | 
				
			|||||||
				INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
									INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
				
			||||||
				INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
									INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
				
			||||||
				INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
									INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
				
			||||||
 | 
									IPHONEOS_DEPLOYMENT_TARGET = 16.6;
 | 
				
			||||||
				LD_RUNPATH_SEARCH_PATHS = (
 | 
									LD_RUNPATH_SEARCH_PATHS = (
 | 
				
			||||||
					"$(inherited)",
 | 
										"$(inherited)",
 | 
				
			||||||
					"@executable_path/Frameworks",
 | 
										"@executable_path/Frameworks",
 | 
				
			||||||
@@ -1181,6 +1194,7 @@
 | 
				
			|||||||
				INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
									INFOPLIST_KEY_CFBundleDisplayName = WatchRunner;
 | 
				
			||||||
				INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
									INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
 | 
				
			||||||
				INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
									INFOPLIST_KEY_WKCompanionAppBundleIdentifier = dev.solsynth.solian;
 | 
				
			||||||
 | 
									IPHONEOS_DEPLOYMENT_TARGET = 16.6;
 | 
				
			||||||
				LD_RUNPATH_SEARCH_PATHS = (
 | 
									LD_RUNPATH_SEARCH_PATHS = (
 | 
				
			||||||
					"$(inherited)",
 | 
										"$(inherited)",
 | 
				
			||||||
					"@executable_path/Frameworks",
 | 
										"@executable_path/Frameworks",
 | 
				
			||||||
@@ -1703,6 +1717,7 @@
 | 
				
			|||||||
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 | 
									SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 | 
				
			||||||
				SWIFT_VERSION = 5.0;
 | 
									SWIFT_VERSION = 5.0;
 | 
				
			||||||
				VERSIONING_SYSTEM = "apple-generic";
 | 
									VERSIONING_SYSTEM = "apple-generic";
 | 
				
			||||||
 | 
									WATCHOS_DEPLOYMENT_TARGET = 11.6;
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			name = Debug;
 | 
								name = Debug;
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
@@ -1731,6 +1746,7 @@
 | 
				
			|||||||
				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 | 
									SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 | 
				
			||||||
				SWIFT_VERSION = 5.0;
 | 
									SWIFT_VERSION = 5.0;
 | 
				
			||||||
				VERSIONING_SYSTEM = "apple-generic";
 | 
									VERSIONING_SYSTEM = "apple-generic";
 | 
				
			||||||
 | 
									WATCHOS_DEPLOYMENT_TARGET = 11.6;
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			name = Release;
 | 
								name = Release;
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,6 +95,8 @@
 | 
				
			|||||||
		<string>UIInterfaceOrientationLandscapeRight</string>
 | 
							<string>UIInterfaceOrientationLandscapeRight</string>
 | 
				
			||||||
		<string>UIInterfaceOrientationPortrait</string>
 | 
							<string>UIInterfaceOrientationPortrait</string>
 | 
				
			||||||
	</array>
 | 
						</array>
 | 
				
			||||||
 | 
						<key>WKCompanionAppBundleIdentifier</key>
 | 
				
			||||||
 | 
						<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 | 
				
			||||||
	<key>UISupportedInterfaceOrientations~ipad</key>
 | 
						<key>UISupportedInterfaceOrientations~ipad</key>
 | 
				
			||||||
	<array>
 | 
						<array>
 | 
				
			||||||
		<string>UIInterfaceOrientationLandscapeLeft</string>
 | 
							<string>UIInterfaceOrientationLandscapeLeft</string>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,14 +59,16 @@ class NotificationService: UNNotificationServiceExtension {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let pfpIdentifier = meta["pfp"] as? String
 | 
					        let pfpIdentifier = meta["pfp"] as? String
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        let metaCopy = meta as? [String: Any] ?? [:]
 | 
					        let metaCopy = meta as? [String: Any] ?? [:]
 | 
				
			||||||
        let pfpUrl = pfpIdentifier != nil ? getAttachmentUrl(for: pfpIdentifier!) : nil
 | 
					        let pfpUrl = pfpIdentifier != nil ? getAttachmentUrl(for: pfpIdentifier!) : nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        let handle = INPersonHandle(value: "\(metaCopy["user_id"] ?? "")", type: .unknown)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if let pfpUrl = pfpUrl, let url = URL(string: pfpUrl) {
 | 
				
			||||||
            let targetSize = 512
 | 
					            let targetSize = 512
 | 
				
			||||||
            let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
 | 
					            let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        KingfisherManager.shared.retrieveImage(with: URL(string: pfpUrl!)!, options: [.processor(scaleProcessor)], completionHandler: { result in
 | 
					            KingfisherManager.shared.retrieveImage(with: url, options: [.processor(scaleProcessor)], completionHandler: { result in
 | 
				
			||||||
                var image: Data?
 | 
					                var image: Data?
 | 
				
			||||||
                switch result {
 | 
					                switch result {
 | 
				
			||||||
                case .success(let value):
 | 
					                case .success(let value):
 | 
				
			||||||
@@ -75,7 +77,6 @@ class NotificationService: UNNotificationServiceExtension {
 | 
				
			|||||||
                    print("Unable to get pfp url: \(error)")
 | 
					                    print("Unable to get pfp url: \(error)")
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let handle = INPersonHandle(value: "\(metaCopy["user_id"] ?? "")", type: .unknown)
 | 
					 | 
				
			||||||
                let sender = INPerson(
 | 
					                let sender = INPerson(
 | 
				
			||||||
                    personHandle: handle,
 | 
					                    personHandle: handle,
 | 
				
			||||||
                    nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"),
 | 
					                    nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"),
 | 
				
			||||||
@@ -85,9 +86,28 @@ class NotificationService: UNNotificationServiceExtension {
 | 
				
			|||||||
                    customIdentifier: nil
 | 
					                    customIdentifier: nil
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                let intent = self.createMessageIntent(with: sender, meta: metaCopy, body: content.body)
 | 
				
			||||||
 | 
					                self.donateInteraction(for: intent)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                content.categoryIdentifier = "CHAT_MESSAGE"
 | 
					                content.categoryIdentifier = "CHAT_MESSAGE"
 | 
				
			||||||
                self.contentHandler?(content)
 | 
					                self.contentHandler?(content)
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            let sender = INPerson(
 | 
				
			||||||
 | 
					                personHandle: handle,
 | 
				
			||||||
 | 
					                nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"),
 | 
				
			||||||
 | 
					                displayName: content.title,
 | 
				
			||||||
 | 
					                image: nil,
 | 
				
			||||||
 | 
					                contactIdentifier: nil,
 | 
				
			||||||
 | 
					                customIdentifier: nil
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            let intent = self.createMessageIntent(with: sender, meta: metaCopy, body: content.body)
 | 
				
			||||||
 | 
					            self.donateInteraction(for: intent)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            content.categoryIdentifier = "CHAT_MESSAGE"
 | 
				
			||||||
 | 
					            self.contentHandler?(content)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    private func handleDefaultNotification(content: UNMutableNotificationContent) throws {
 | 
					    private func handleDefaultNotification(content: UNMutableNotificationContent) throws {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -370,7 +370,7 @@ struct ChatRoomView: View {
 | 
				
			|||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    .labelStyle(.iconOnly)
 | 
					                    .labelStyle(.iconOnly)
 | 
				
			||||||
                    .buttonStyle(.glass)
 | 
					                    .buttonStyle(.automatic)
 | 
				
			||||||
                    .disabled(messageText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || isSending)
 | 
					                    .disabled(messageText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || isSending)
 | 
				
			||||||
                    .frame(width: 40, height: 40)
 | 
					                    .frame(width: 40, height: 40)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,14 +81,14 @@ struct StatusCreationView: View {
 | 
				
			|||||||
                    Button("Cancel") {
 | 
					                    Button("Cancel") {
 | 
				
			||||||
                        dismiss()
 | 
					                        dismiss()
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    .buttonStyle(.glass)
 | 
					                    .buttonStyle(.automatic)
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                    Button(isSubmitting ? "Saving..." : "Save") {
 | 
					                    Button(isSubmitting ? "Saving..." : "Save") {
 | 
				
			||||||
                        Task {
 | 
					                        Task {
 | 
				
			||||||
                            await submitStatus()
 | 
					                            await submitStatus()
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    .buttonStyle(.glassProminent)
 | 
					                    .buttonStyle(.automatic)
 | 
				
			||||||
                    .disabled(isSubmitting)
 | 
					                    .disabled(isSubmitting)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                .padding(.horizontal)
 | 
					                .padding(.horizontal)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -425,7 +425,7 @@ class SettingsScreen extends HookConsumerWidget {
 | 
				
			|||||||
      // FAB position settings
 | 
					      // FAB position settings
 | 
				
			||||||
      ListTile(
 | 
					      ListTile(
 | 
				
			||||||
        minLeadingWidth: 48,
 | 
					        minLeadingWidth: 48,
 | 
				
			||||||
        title: Text('fabPosition').tr(),
 | 
					        title: Text('fabLocation').tr(),
 | 
				
			||||||
        contentPadding: const EdgeInsets.only(left: 24, right: 17),
 | 
					        contentPadding: const EdgeInsets.only(left: 24, right: 17),
 | 
				
			||||||
        leading: const Icon(Symbols.adjust),
 | 
					        leading: const Icon(Symbols.adjust),
 | 
				
			||||||
        trailing: DropdownButtonHideUnderline(
 | 
					        trailing: DropdownButtonHideUnderline(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,12 +9,24 @@ export 'content/alert.native.dart'
 | 
				
			|||||||
    if (dart.library.html) 'content/alert.web.dart';
 | 
					    if (dart.library.html) 'content/alert.web.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void showSnackBar(String message, {SnackBarAction? action}) {
 | 
					void showSnackBar(String message, {SnackBarAction? action}) {
 | 
				
			||||||
 | 
					  final context = globalOverlay.currentState!.context;
 | 
				
			||||||
 | 
					  final screenWidth = MediaQuery.of(context).size.width;
 | 
				
			||||||
 | 
					  final padding = 40.0;
 | 
				
			||||||
 | 
					  final availableWidth = screenWidth - padding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  showTopSnackBar(
 | 
					  showTopSnackBar(
 | 
				
			||||||
    globalOverlay.currentState!,
 | 
					    globalOverlay.currentState!,
 | 
				
			||||||
    ConstrainedBox(
 | 
					    Center(
 | 
				
			||||||
      constraints: const BoxConstraints(maxWidth: 480),
 | 
					      child: ConstrainedBox(
 | 
				
			||||||
      child: Center(
 | 
					        constraints: BoxConstraints(
 | 
				
			||||||
        child: Card(child: Text(message).padding(horizontal: 20, vertical: 16)),
 | 
					          minWidth: availableWidth.clamp(0, 400),
 | 
				
			||||||
 | 
					          maxWidth: availableWidth.clamp(0, 600),
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        child: Card(
 | 
				
			||||||
 | 
					          elevation: 2,
 | 
				
			||||||
 | 
					          color: Theme.of(context).colorScheme.surfaceContainer,
 | 
				
			||||||
 | 
					          child: Text(message).padding(horizontal: 20, vertical: 16),
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
    snackBarPosition: SnackBarPosition.bottom,
 | 
					    snackBarPosition: SnackBarPosition.bottom,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,23 +22,6 @@ class ComposeSubmitUtils {
 | 
				
			|||||||
      throw Exception('Already submitting');
 | 
					      throw Exception('Already submitting');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Don't submit empty posts (no content and no attachments)
 | 
					 | 
				
			||||||
    final hasContent =
 | 
					 | 
				
			||||||
        state.titleController.text.trim().isNotEmpty ||
 | 
					 | 
				
			||||||
        state.descriptionController.text.trim().isNotEmpty ||
 | 
					 | 
				
			||||||
        state.contentController.text.trim().isNotEmpty;
 | 
					 | 
				
			||||||
    final hasAttachments = state.attachments.value.isNotEmpty;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!hasContent && !hasAttachments) {
 | 
					 | 
				
			||||||
      // Show error message if context is mounted
 | 
					 | 
				
			||||||
      if (context.mounted) {
 | 
					 | 
				
			||||||
        ScaffoldMessenger.of(
 | 
					 | 
				
			||||||
          context,
 | 
					 | 
				
			||||||
        ).showSnackBar(SnackBar(content: Text('postContentEmpty')));
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      throw Exception('Post content is empty'); // Don't submit empty posts
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      state.submitting.value = true;
 | 
					      state.submitting.value = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user