Fixes global chat color setting

This commit is contained in:
Josh Perez 2021-06-02 17:05:09 -04:00 committed by GitHub
parent a6ce00ff37
commit bd46e3afd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 250 additions and 122 deletions

View file

@ -0,0 +1,21 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export function reloadSelectedConversation(): void {
const { conversations } = window.reduxStore.getState();
const { selectedConversationId } = conversations;
if (!selectedConversationId) {
return;
}
const conversation = window.ConversationController.get(
selectedConversationId
);
if (!conversation) {
return;
}
conversation.cachedProps = undefined;
window.reduxActions.conversations.conversationChanged(
conversation.id,
conversation.format()
);
}