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: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
ref.read(eventRepositoryProvider.future).then(
|
||||
(value) => value.deleteFight(fight.id).then(
|
||||
(value) {
|
||||
fightsRefresher();
|
||||
},
|
||||
),
|
||||
);
|
||||
final delete = await showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text("Delete Fight?"),
|
||||
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")),
|
||||
TextButton(
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren