Skip to content

Commit

Permalink
🐛 Fix clearAllConversations error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmai-dev committed Sep 21, 2024
1 parent 41f42b7 commit f1c099d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ChatMLX/Features/Settings/GeneralView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ struct GeneralView: View {
private func clearAllConversations() {
do {
try modelContext.delete(model: Conversation.self)
try modelContext.save()
conversationViewModel.selectedConversation = nil
} catch {
logger.error("Error deleting all conversations: \(error)")
Expand Down

0 comments on commit f1c099d

Please sign in to comment.