Compare commits

...

3 Commits

Author SHA1 Message Date
baed28bef7 🐛 Fix some errors 2025-09-06 23:00:51 +08:00
7a6eecf628 🐛 Fix post shuffle 2025-09-06 23:00:26 +08:00
6a63bc235b 🐛 Fix iOS NSE 2025-09-06 22:52:05 +08:00
5 changed files with 45 additions and 42 deletions

View File

@@ -47,6 +47,7 @@ class NotificationService: UNNotificationServiceExtension {
private func processNotification(request: UNNotificationRequest, content: UNMutableNotificationContent) throws {
switch content.userInfo["type"] as? String {
case "messages.new":
content.categoryIdentifier = "REPLYABLE_MESSAGE"
try handleMessagingNotification(request: request, content: content)
default:
try handleDefaultNotification(content: content)
@@ -60,8 +61,6 @@ class NotificationService: UNNotificationServiceExtension {
let pfpIdentifier = meta["pfp"] as? String
content.categoryIdentifier = "REPLYABLE_MESSAGE"
let metaCopy = meta as? [String: Any] ?? [:]
let pfpUrl = pfpIdentifier != nil ? getAttachmentUrl(for: pfpIdentifier!) : nil

View File

@@ -72,7 +72,7 @@ class MarketplaceWebFeedsScreen extends HookConsumerWidget {
searchController.clear();
}
return null;
}, [query.value]);
}, [query]);
// Clean up timer on dispose
useEffect(() {

View File

@@ -77,7 +77,7 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
searchController.clear();
}
return null;
}, [query.value]);
}, [query]);
// Clean up timer on dispose
useEffect(() {

View File

@@ -48,7 +48,7 @@ class PostFeaturedList extends HookConsumerWidget {
'PostFeaturedList: isCollapsed changed to ${isCollapsed.value}',
);
return null;
}, [isCollapsed.value]);
}, [isCollapsed]);
useEffect(() {
if (featuredPostsAsync.hasValue && featuredPostsAsync.value!.isNotEmpty) {
@@ -93,7 +93,7 @@ class PostFeaturedList extends HookConsumerWidget {
);
}
return null;
}, [featuredPostsAsync.value]);
}, [featuredPostsAsync]);
return ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(8)),

View File

@@ -36,46 +36,50 @@ class PostShuffleScreen extends HookConsumerWidget {
bottom:
kBottomControlHeight + MediaQuery.of(context).padding.bottom,
),
child:
(postListState.value?.items.length ?? 0) > 0
? CardSwiper(
controller: cardSwiperController,
cardsCount: postListState.value!.items.length,
isLoop: false,
cardBuilder: (
context,
index,
horizontalOffsetPercentage,
verticalOffsetPercentage,
) {
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 540),
child: SingleChildScrollView(
child: Card(
margin: EdgeInsets.zero,
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(8),
),
child: PostActionableItem(
item: postListState.value!.items[index],
),
child: Builder(
key: ValueKey(postListState.value?.items.length ?? 0),
builder: (context) {
if ((postListState.value?.items.length ?? 0) > 0) {
return CardSwiper(
controller: cardSwiperController,
cardsCount: postListState.value!.items.length,
isLoop: false,
cardBuilder: (
context,
index,
horizontalOffsetPercentage,
verticalOffsetPercentage,
) {
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 540),
child: SingleChildScrollView(
child: Card(
margin: EdgeInsets.zero,
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(8),
),
child: PostActionableItem(
item: postListState.value!.items[index],
),
),
),
),
);
},
onEnd: () {
if (postListState.value?.hasMore ?? true) {
postListNotifier.fetch(
cursor: postListState.value?.nextCursor,
);
}
},
)
: Center(child: CircularProgressIndicator()),
),
);
},
onEnd: () async {
if (postListState.value?.hasMore ?? true) {
postListNotifier.forceRefresh();
}
},
);
} else {
return Center(child: CircularProgressIndicator());
}
},
),
),
Positioned(
left: 0,