Skip to content

Commit

Permalink
handle delete opening chat thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Dat-TG committed Dec 29, 2023
1 parent 160cf41 commit bca9567
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/core/widgets/chat_thread.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class _ChatThreadWidgetState extends State<ChatThreadWidget> {
// Perform deletion logic here
// For example, you might call a function to delete the chat thread
// deleteChatThread();
int currentId = _chatStore.id;
if (currentId == widget.id) {
_chatStore.setChatThreadId(-1);
}
_chatStore.deleteChatThread(widget.id);
Navigator.of(context).pop(); // Close the dialog after deletion
},
Expand Down

0 comments on commit bca9567

Please sign in to comment.