Remove reundant blocking progress bar

This commit is contained in:
Neeraj Gupta 2022-12-08 16:42:51 +05:30
parent b71c214c58
commit de78e2223a
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -426,20 +426,14 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
}
Future<void> _showShareCollectionDialog() async {
var collection = widget.collection;
final dialog = createProgressDialog(context, "Please wait...");
await dialog.show();
final collection = widget.collection;
try {
if (collection == null || widget.type != GalleryType.ownedCollection) {
throw Exception(
"Cannot share empty collection of type ${widget.type}",
);
} else {
final sharees =
await CollectionsService.instance.getSharees(collection.id);
collection = collection.copyWith(sharees: sharees);
}
await dialog.hide();
// await dialog.hide();
unawaited(
routeToPage(
context,
@ -448,7 +442,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
);
} catch (e, s) {
_logger.severe(e, s);
await dialog.hide();
// await dialog.hide();
showGenericErrorDialog(context);
}
}