🐛 Bug fixes

This commit is contained in:
2025-10-31 19:02:53 +08:00
parent 504322c2dd
commit d28c11940d
10 changed files with 87 additions and 48 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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;
}; };

View File

@@ -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>

View File

@@ -57,37 +57,57 @@ class NotificationService: UNNotificationServiceExtension {
guard let meta = content.userInfo["meta"] as? [AnyHashable: Any] else { guard let meta = content.userInfo["meta"] as? [AnyHashable: Any] else {
throw ParseNotificationPayloadError.missingMetadata("The notification has no meta.") throw ParseNotificationPayloadError.missingMetadata("The notification has no meta.")
} }
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 targetSize = 512 let handle = INPersonHandle(value: "\(metaCopy["user_id"] ?? "")", type: .unknown)
let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
if let pfpUrl = pfpUrl, let url = URL(string: pfpUrl) {
KingfisherManager.shared.retrieveImage(with: URL(string: pfpUrl!)!, options: [.processor(scaleProcessor)], completionHandler: { result in let targetSize = 512
var image: Data? let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
switch result {
case .success(let value): KingfisherManager.shared.retrieveImage(with: url, options: [.processor(scaleProcessor)], completionHandler: { result in
image = value.image.pngData() var image: Data?
case .failure(let error): switch result {
print("Unable to get pfp url: \(error)") case .success(let value):
} image = value.image.pngData()
case .failure(let error):
let handle = INPersonHandle(value: "\(metaCopy["user_id"] ?? "")", type: .unknown) print("Unable to get pfp url: \(error)")
}
let sender = INPerson(
personHandle: handle,
nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"),
displayName: content.title,
image: image == nil ? nil : INImage(imageData: image!),
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)
})
} else {
let sender = INPerson( let sender = INPerson(
personHandle: handle, personHandle: handle,
nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"), nameComponents: PersonNameComponents(nickname: "\(metaCopy["sender_name"] ?? "")"),
displayName: content.title, displayName: content.title,
image: image == nil ? nil : INImage(imageData: image!), image: nil,
contactIdentifier: nil, contactIdentifier: nil,
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)
}) }
} }
private func handleDefaultNotification(content: UNMutableNotificationContent) throws { private func handleDefaultNotification(content: UNMutableNotificationContent) throws {

View File

@@ -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)
} }

View File

@@ -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)

View File

@@ -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(

View File

@@ -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,

View File

@@ -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;