func refreshState()

in HuggingChat-Mac/Models/MenuViewModel.swift [35:46]


    func refreshState() {
        HuggingChatSession.shared.refreshLoginState()
        if (HuggingChatSession.shared.currentUser != nil) {
            self.getConversations()
        } else {
            self.conversations = [:]
        }
        
        if let conversation = HuggingChatSession.shared.currentConversation {
            self.currentConversationId = conversation
        }
    }