mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 09:16:19 +01:00
Fix cached album not shown when offline
This commit is contained in:
parent
42b931fa62
commit
6545e78bb6
1 changed files with 6 additions and 2 deletions
|
@ -251,12 +251,16 @@ class ListAlbumBloc extends Bloc<ListAlbumBlocEvent, ListAlbumBlocState> {
|
|||
try {
|
||||
shares = await shareRepo.listDir(ev.account,
|
||||
File(path: remote_storage_util.getRemoteAlbumsDir(ev.account)));
|
||||
} on ApiException catch(e) {
|
||||
} on ApiException catch (e, stackTrace) {
|
||||
if (e.response.statusCode == 404) {
|
||||
// Normal when album dir is not created yet
|
||||
} else {
|
||||
rethrow;
|
||||
_log.shout("[_queryWithAlbumDataSource] Failed while listDir", e,
|
||||
stackTrace);
|
||||
}
|
||||
} catch (e, stackTrace) {
|
||||
_log.shout(
|
||||
"[_queryWithAlbumDataSource] Failed while listDir", e, stackTrace);
|
||||
}
|
||||
final items = albums.map((e) {
|
||||
final isSharedByMe = shares.any((element) =>
|
||||
|
|
Loading…
Reference in a new issue