fixed overwrite on internal copy, DST drift in widget anchors, inline errors without controller and removed dead room lookup
This commit is contained in:
@@ -108,16 +108,11 @@ class _ChatInfoState extends State<ChatInfo> {
|
||||
if (result == null || !mounted) return;
|
||||
|
||||
if (result is AvatarRemoveResult) {
|
||||
var confirmed = false;
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: (_) => ConfirmDialog(
|
||||
title: 'Gruppenbild entfernen',
|
||||
content: 'Möchtest du das Gruppenbild wirklich entfernen?',
|
||||
confirmButton: 'Entfernen',
|
||||
onConfirm: () => confirmed = true,
|
||||
),
|
||||
);
|
||||
final confirmed = await const ConfirmDialog(
|
||||
title: 'Gruppenbild entfernen',
|
||||
content: 'Möchtest du das Gruppenbild wirklich entfernen?',
|
||||
confirmButton: 'Entfernen',
|
||||
).ask(context);
|
||||
if (!confirmed || !mounted) return;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,17 +32,13 @@ class FavoriteToggleTile extends StatelessWidget {
|
||||
/// Resolves to true once the room was left.
|
||||
Future<bool> confirmLeaveRoom(BuildContext context, String token) async {
|
||||
final chatList = context.read<ChatListBloc>();
|
||||
final left = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (_) => ConfirmDialog(
|
||||
title: 'Talk-Chat verlassen',
|
||||
content: 'Du benötigst ggf. eine Einladung um erneut beizutreten.',
|
||||
confirmButton: 'Verlassen',
|
||||
onConfirmAsync: () async {
|
||||
await LeaveRoom(token).run();
|
||||
unawaited(chatList.refresh());
|
||||
},
|
||||
),
|
||||
);
|
||||
return left ?? false;
|
||||
return ConfirmDialog(
|
||||
title: 'Talk-Chat verlassen',
|
||||
content: 'Du benötigst ggf. eine Einladung um erneut beizutreten.',
|
||||
confirmButton: 'Verlassen',
|
||||
onConfirmAsync: () async {
|
||||
await LeaveRoom(token).run();
|
||||
unawaited(chatList.refresh());
|
||||
},
|
||||
).ask(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user