mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-22 17:38:10 +01:00
Fixes global chat color setting
This commit is contained in:
21
ts/shims/reloadSelectedConversation.ts
Normal file
21
ts/shims/reloadSelectedConversation.ts
Normal 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()
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user