fixed overwrite on internal copy, DST drift in widget anchors, inline errors without controller and removed dead room lookup
This commit is contained in:
@@ -154,20 +154,15 @@ class _ShareOptionsBodyState extends State<_ShareOptionsBody> {
|
||||
_update(const ShareUpdateParams(password: ''));
|
||||
|
||||
Future<void> _confirmDelete() async {
|
||||
// Use showDialog directly (not asDialog) so we get the AsyncDialogAction's
|
||||
// `true` result and can close the options sheet afterwards — popping inside
|
||||
// Close the options sheet only after the dialog returned — popping inside
|
||||
// onConfirmAsync would target the dialog route, not the sheet.
|
||||
final dialog = ConfirmDialog(
|
||||
final deleted = await ConfirmDialog(
|
||||
title: 'Freigabe löschen?',
|
||||
content: 'Die Freigabe wird aufgehoben.',
|
||||
confirmButton: 'Löschen',
|
||||
onConfirmAsync: () => FileSharingApi().remove(_share.id),
|
||||
);
|
||||
final deleted = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: dialog.build,
|
||||
);
|
||||
if (deleted != true || !mounted) return;
|
||||
).ask(context);
|
||||
if (!deleted || !mounted) return;
|
||||
widget.onChanged();
|
||||
if (Navigator.of(context).canPop()) Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user