Optimization/fix slow backup when asset list is long. (#104)

* Handle pause/restart listening to event on_upload_success and reload asset list after navigating back from BackupControllerPage
* Remove unused api endpoint
This commit is contained in:
Alex 2022-04-03 12:31:45 -05:00 committed by GitHub
parent 2ff25b49f4
commit be2794a372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 66 deletions

View file

@ -33,6 +33,10 @@ class HomePage extends HookConsumerWidget {
return null;
}, []);
void reloadAllAsset() {
ref.read(assetProvider.notifier).getAllAsset();
}
Widget _buildBody() {
if (assetGroupByDateTime.isNotEmpty) {
int? lastMonth;
@ -86,7 +90,9 @@ class HomePage extends HookConsumerWidget {
child: null,
),
)
: const ImmichSliverAppBar(),
: ImmichSliverAppBar(
onPopBack: reloadAllAsset,
),
duration: const Duration(milliseconds: 350),
),
..._imageGridGroup