Fixes for Fixes for the final Fixes
Dieser Commit ist enthalten in:
Ursprung
cff370fa15
Commit
2c44eea71c
|
@ -481,14 +481,31 @@ class EditEventFightDialog extends HookConsumerWidget {
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Navigator.of(context).pop();
|
final delete = await showDialog(
|
||||||
ref.read(eventRepositoryProvider.future).then(
|
context: context,
|
||||||
(value) => value.deleteFight(fight.id).then(
|
builder: (context) => AlertDialog(
|
||||||
(value) {
|
title: const Text("Delete Fight?"),
|
||||||
fightsRefresher();
|
content: const Text(
|
||||||
},
|
"Do you really want to delete this fight?"),
|
||||||
),
|
actions: [
|
||||||
);
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
|
child: const Text("No")),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
|
child: const Text("Yes",
|
||||||
|
style: TextStyle(color: Colors.red))),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
if (delete) {
|
||||||
|
ref.read(eventRepositoryProvider.future).then(
|
||||||
|
(value) => value.deleteFight(fight.id).then(
|
||||||
|
(value) {
|
||||||
|
fightsRefresher();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: const Text("Delete")),
|
child: const Text("Delete")),
|
||||||
TextButton(
|
TextButton(
|
||||||
|
|
In neuem Issue referenzieren
Einen Benutzer sperren