diff --git a/lib/view/common/pushable_listview.dart b/lib/view/common/pushable_listview.dart index 288e2643a..4af7680b6 100644 --- a/lib/view/common/pushable_listview.dart +++ b/lib/view/common/pushable_listview.dart @@ -13,6 +13,7 @@ class PushableListView extends ConsumerStatefulWidget { final Object listKey; final bool shrinkWrap; final ScrollPhysics? physics; + final bool hideIsEmpty; const PushableListView({ super.key, @@ -23,6 +24,7 @@ class PushableListView extends ConsumerStatefulWidget { this.shrinkWrap = false, this.physics, this.additionalErrorInfo, + this.hideIsEmpty = false, }); @override @@ -115,6 +117,14 @@ class PushableListViewState extends ConsumerState> { itemBuilder: (context, index) { if (items.length == index) { if (isFinalPage) { + if (items.isEmpty && !widget.hideIsEmpty) { + return const Center( + child: Padding( + padding: EdgeInsets.all(10), + child: Text("ありません"), + ), + ); + } return Container(); } diff --git a/lib/view/note_create_page/drive_file_select_dialog.dart b/lib/view/note_create_page/drive_file_select_dialog.dart index d58be56fd..47725fa94 100644 --- a/lib/view/note_create_page/drive_file_select_dialog.dart +++ b/lib/view/note_create_page/drive_file_select_dialog.dart @@ -69,6 +69,7 @@ class DriveFileSelectDialogState extends ConsumerState { PushableListView( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), + hideIsEmpty: true, initializeFuture: () async { final misskey = ref.read(misskeyProvider(widget.account)); final response = await misskey.drive.folders.folders( diff --git a/lib/view/note_detail_page/note_detail_page.dart b/lib/view/note_detail_page/note_detail_page.dart index a78cfdb58..f3da16792 100644 --- a/lib/view/note_detail_page/note_detail_page.dart +++ b/lib/view/note_detail_page/note_detail_page.dart @@ -101,6 +101,7 @@ class NoteDetailPageState extends ConsumerState { child: PushableListView( physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, + hideIsEmpty: true, initializeFuture: () async { final repliesResult = await ref .read(misskeyProvider(widget.account)) diff --git a/lib/view/settings_page/import_export_page/folder_select_dialog.dart b/lib/view/settings_page/import_export_page/folder_select_dialog.dart index 39871bc9d..72cc64a6d 100644 --- a/lib/view/settings_page/import_export_page/folder_select_dialog.dart +++ b/lib/view/settings_page/import_export_page/folder_select_dialog.dart @@ -63,6 +63,7 @@ class FolderSelectDialogState extends ConsumerState { PushableListView( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), + hideIsEmpty: true, initializeFuture: () async { final misskey = ref.read(misskeyProvider(widget.account)); final response = await misskey.drive.folders.folders(