mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Show error msg when failed initing dynamic album
This commit is contained in:
parent
2c62b35321
commit
bc3c06cd51
1 changed files with 13 additions and 2 deletions
|
@ -162,8 +162,19 @@ class _DynamicAlbumBrowserState extends State<DynamicAlbumBrowser>
|
|||
|
||||
Future<void> _initAlbum() async {
|
||||
assert(widget.album.provider is AlbumDynamicProvider);
|
||||
final items = await PreProcessAlbum(AppDb())(widget.account, widget.album);
|
||||
final album = await _updateAlbumPostPopulate(widget.album, items);
|
||||
final List<AlbumItem> items;
|
||||
final Album album;
|
||||
try {
|
||||
items = await PreProcessAlbum(AppDb())(widget.account, widget.album);
|
||||
album = await _updateAlbumPostPopulate(widget.album, items);
|
||||
} catch (e, stackTrace) {
|
||||
_log.severe("[_initAlbum] Failed while PreProcessAlbum", e, stackTrace);
|
||||
SnackBarManager().showSnackBar(SnackBar(
|
||||
content: Text(exception_util.toUserString(e)),
|
||||
duration: k.snackBarDurationNormal,
|
||||
));
|
||||
return;
|
||||
}
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_album = album;
|
||||
|
|
Loading…
Reference in a new issue