refactor: Update Twitter OAuth 2.0 PKCE flow for dynamic redirect URI and public client authentication, replace SVG back button with a native icon, and enhance Twitter login error reporting.
This commit is contained in:
@@ -171,8 +171,8 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
|
||||
_showConfirmDialog(
|
||||
title: 'Clear Chat',
|
||||
message: 'Are you sure you want to clear all messages? This cannot be undone.',
|
||||
onConfirm: () {
|
||||
ref.read(messagingProvider.notifier).clearChat(widget.conversationId);
|
||||
onConfirm: () async {
|
||||
await ref.read(messagingProvider.notifier).clearChat(widget.conversationId);
|
||||
},
|
||||
);
|
||||
break;
|
||||
@@ -194,9 +194,10 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
|
||||
_showConfirmDialog(
|
||||
title: 'Delete Conversation',
|
||||
message: 'Are you sure you want to delete this conversation? This cannot be undone.',
|
||||
onConfirm: () {
|
||||
ref.read(messagingProvider.notifier).deleteConversation(widget.conversationId);
|
||||
context.go('/messages');
|
||||
onConfirm: () async {
|
||||
final notifier = ref.read(messagingProvider.notifier);
|
||||
await notifier.deleteConversation(widget.conversationId);
|
||||
if (mounted) context.go('/messages');
|
||||
},
|
||||
isDanger: true,
|
||||
);
|
||||
@@ -207,7 +208,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
|
||||
void _showConfirmDialog({
|
||||
required String title,
|
||||
required String message,
|
||||
required VoidCallback onConfirm,
|
||||
required Future<void> Function() onConfirm,
|
||||
bool isDanger = false,
|
||||
}) {
|
||||
showDialog(
|
||||
|
||||
Reference in New Issue
Block a user