💄 Optimize floating action button

This commit is contained in:
2026-01-02 14:44:36 +08:00
parent 800815c721
commit 3605b997b1
8 changed files with 13 additions and 340 deletions

View File

@@ -67,7 +67,6 @@ class RepliesNotifier extends _$RepliesNotifier {
);
if (!ref.mounted) return;
state = state.copyWith(
posts: [...state.posts, ...response.data.map((e) => SnPost.fromJson(e))],
loading: false,
@@ -160,7 +159,9 @@ class PostReplyPreview extends HookConsumerWidget {
if (isAutoload) {
Future(() async {
try {
await ref.read(repliesProvider(parent.id).notifier).fetchMore(3);
if (context.mounted) {
await ref.read(repliesProvider(parent.id).notifier).fetchMore(3);
}
} catch (err) {
showErrorAlert(err);
}