diff --git a/lib/providers/folder_detail_provider.dart b/lib/providers/folder_detail_provider.dart index 7445143..4c46d9d 100644 --- a/lib/providers/folder_detail_provider.dart +++ b/lib/providers/folder_detail_provider.dart @@ -46,4 +46,12 @@ class FolderDetail extends _$FolderDetail { return res.length; } + + Future refresh({required String folderName}) async { + state = const AsyncValue.loading(); + + state = await AsyncValue.guard(() async { + return fetchItem(folderName: folderName); + }); + } } diff --git a/lib/screens/home/edit_content_view.dart b/lib/screens/home/edit_content_view.dart index 497873f..8024121 100644 --- a/lib/screens/home/edit_content_view.dart +++ b/lib/screens/home/edit_content_view.dart @@ -51,6 +51,7 @@ class EditContentView extends HookConsumerWidget { // await ref.read(hashtagViewProvider.notifier).refresh(); // await ref.read(folderViewProvider.notifier).refresh(); isEditMode.value = false; + } void showEditHashtagModal() { diff --git a/lib/screens/home/folder_detail_view.dart b/lib/screens/home/folder_detail_view.dart index f00afdb..368bd6a 100644 --- a/lib/screens/home/folder_detail_view.dart +++ b/lib/screens/home/folder_detail_view.dart @@ -30,11 +30,11 @@ class FolderDetailView extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { var controller = useScrollController(); + var contentList = useState>([]); var pageNum = useState(0); var hasMore = useState(true); var loading = useState(false); var folderDetailAsync = ref.watch(folderDetailProvider(folderId: id)); - Future pullToRefresh() async { ref.refresh(folderDetailProvider(folderId: id)).value; } @@ -52,6 +52,7 @@ class FolderDetailView extends HookConsumerWidget { BranchUniversalObject buo = BranchUniversalObject( canonicalIdentifier: '${GoRoutes.folder.fullPath}/$id?folderName=$encodeFolderName&c=$contentCount', + title: '모아 폴더 공유', contentDescription: folderName, // imageUrl: @@ -79,7 +80,6 @@ class FolderDetailView extends HookConsumerWidget { var length = await ref .read(folderDetailProvider(folderId: id).notifier) .loadMore(folderId: id, page: page); - loading.value = false; if (length < 10) { hasMore.value = false; diff --git a/lib/widgets/moa_widgets/dynamic_grid_list.dart b/lib/widgets/moa_widgets/dynamic_grid_list.dart index 686b6aa..7b5b568 100644 --- a/lib/widgets/moa_widgets/dynamic_grid_list.dart +++ b/lib/widgets/moa_widgets/dynamic_grid_list.dart @@ -43,6 +43,7 @@ class DynamicGridList extends HookWidget { contentUrl != '' ? AddContentType.url : AddContentType.image, ), ); + folderDetailRefresher?.value = val as bool; } return RefreshIndicator( diff --git a/pubspec.yaml b/pubspec.yaml index 0228848..d030c0f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,6 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.3+18 - environment: sdk: ">=3.0.0 <4.0.0"