mirror of
https://github.com/ente-io/ente.git
synced 2025-08-12 09:10:25 +00:00
[mob][photos] Show loading dialog after clicking on send link till the native share sheet comes up
This commit is contained in:
parent
5367e90ecf
commit
ee602e63d2
@ -110,12 +110,6 @@ class CollectionActions {
|
|||||||
BuildContext context,
|
BuildContext context,
|
||||||
List<EnteFile> files,
|
List<EnteFile> files,
|
||||||
) async {
|
) async {
|
||||||
final dialog = createProgressDialog(
|
|
||||||
context,
|
|
||||||
S.of(context).creatingLink,
|
|
||||||
isDismissible: true,
|
|
||||||
);
|
|
||||||
await dialog.show();
|
|
||||||
try {
|
try {
|
||||||
// create album with emptyName, use collectionCreationTime on UI to
|
// create album with emptyName, use collectionCreationTime on UI to
|
||||||
// show name
|
// show name
|
||||||
@ -143,10 +137,8 @@ class CollectionActions {
|
|||||||
await collectionsService.addOrCopyToCollection(collection.id, files);
|
await collectionsService.addOrCopyToCollection(collection.id, files);
|
||||||
logger.finest("creating public link for the newly created album");
|
logger.finest("creating public link for the newly created album");
|
||||||
await CollectionsService.instance.createShareUrl(collection);
|
await CollectionsService.instance.createShareUrl(collection);
|
||||||
await dialog.hide();
|
|
||||||
return collection;
|
return collection;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await dialog.hide();
|
|
||||||
await showGenericErrorDialog(context: context, error: e);
|
await showGenericErrorDialog(context: context, error: e);
|
||||||
logger.severe("Failing to create link for selected files", e, s);
|
logger.severe("Failing to create link for selected files", e, s);
|
||||||
}
|
}
|
||||||
|
@ -651,11 +651,18 @@ class _FileSelectionActionsWidgetState
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final dialog = createProgressDialog(
|
||||||
|
context,
|
||||||
|
S.of(context).creatingLink,
|
||||||
|
isDismissible: true,
|
||||||
|
);
|
||||||
|
await dialog.show();
|
||||||
_cachedCollectionForSharedLink ??= await collectionActions
|
_cachedCollectionForSharedLink ??= await collectionActions
|
||||||
.createSharedCollectionLink(context, split.ownedByCurrentUser);
|
.createSharedCollectionLink(context, split.ownedByCurrentUser);
|
||||||
|
|
||||||
final List<EnteFile> ownedSelectedFiles = split.ownedByCurrentUser;
|
final List<EnteFile> ownedSelectedFiles = split.ownedByCurrentUser;
|
||||||
placeholderPath = await _selectedFilesPlaceholderPath(ownedSelectedFiles);
|
placeholderPath = await _selectedFilesPlaceholderPath(ownedSelectedFiles);
|
||||||
|
await dialog.hide();
|
||||||
await _sendLink();
|
await _sendLink();
|
||||||
widget.selectedFiles.clearAll();
|
widget.selectedFiles.clearAll();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user