|
@@ -50,13 +50,13 @@ class CollectionActions {
|
|
),
|
|
),
|
|
const ButtonWidget(
|
|
const ButtonWidget(
|
|
buttonType: ButtonType.secondary,
|
|
buttonType: ButtonType.secondary,
|
|
- buttonAction: ButtonAction.second,
|
|
|
|
|
|
+ buttonAction: ButtonAction.cancel,
|
|
isInAlert: true,
|
|
isInAlert: true,
|
|
shouldStickToDarkTheme: true,
|
|
shouldStickToDarkTheme: true,
|
|
labelText: "Cancel",
|
|
labelText: "Cancel",
|
|
)
|
|
)
|
|
],
|
|
],
|
|
- title: "Remove public link?",
|
|
|
|
|
|
+ title: "Remove public link",
|
|
body:
|
|
body:
|
|
'This will remove the public link for accessing "${collection.name}".',
|
|
'This will remove the public link for accessing "${collection.name}".',
|
|
);
|
|
);
|
|
@@ -64,19 +64,18 @@ class CollectionActions {
|
|
if (result == ButtonAction.error) {
|
|
if (result == ButtonAction.error) {
|
|
showGenericErrorDialog(context: context);
|
|
showGenericErrorDialog(context: context);
|
|
}
|
|
}
|
|
- // return
|
|
|
|
return result == ButtonAction.first;
|
|
return result == ButtonAction.first;
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
final dialog = createProgressDialog(
|
|
final dialog = createProgressDialog(
|
|
context,
|
|
context,
|
|
- enable ? "Creating link..." : "Disabling link...",
|
|
|
|
|
|
+ "Creating link...",
|
|
);
|
|
);
|
|
try {
|
|
try {
|
|
await dialog.show();
|
|
await dialog.show();
|
|
- enable
|
|
|
|
- ? await CollectionsService.instance.createShareUrl(collection)
|
|
|
|
- : await CollectionsService.instance.disableShareUrl(collection);
|
|
|
|
|
|
+ await CollectionsService.instance.createShareUrl(collection);
|
|
dialog.hide();
|
|
dialog.hide();
|
|
return true;
|
|
return true;
|
|
} catch (e) {
|
|
} catch (e) {
|