Reactions: Fix repeated effect playback if paused before ending (#2657)
This commit is contained in:
parent
4c350d53b4
commit
401895c932
@ -8,7 +8,6 @@ import {
|
||||
selectDefaultReaction,
|
||||
selectMaxUserReactions,
|
||||
selectMessageIdsByGroupId,
|
||||
selectCurrentMessageList,
|
||||
} from '../../selectors';
|
||||
import { addMessageReaction, subtractXForEmojiInteraction, updateUnreadReactions } from '../../reducers/reactions';
|
||||
import {
|
||||
@ -159,17 +158,6 @@ addActionHandler('toggleReaction', (global, actions, payload): ActionReturnType
|
||||
return addMessageReaction(global, message, reactions);
|
||||
});
|
||||
|
||||
addActionHandler('openChat', (global, actions, payload): ActionReturnType => {
|
||||
const { id, tabId = getCurrentTabId() } = payload;
|
||||
const currentChatId = selectCurrentMessageList(global, tabId)?.chatId;
|
||||
|
||||
if (currentChatId === id) return global;
|
||||
|
||||
return updateTabState(global, {
|
||||
activeReactions: {},
|
||||
}, tabId);
|
||||
});
|
||||
|
||||
addActionHandler('stopActiveReaction', (global, actions, payload): ActionReturnType => {
|
||||
const { messageId, reaction, tabId = getCurrentTabId() } = payload;
|
||||
|
||||
|
||||
@ -34,14 +34,17 @@ addActionHandler('openChat', (global, actions, payload): ActionReturnType => {
|
||||
}, tabId);
|
||||
}
|
||||
|
||||
if (!currentMessageList
|
||||
|| (
|
||||
currentMessageList.chatId !== id
|
||||
|| currentMessageList.threadId !== threadId
|
||||
|| currentMessageList.type !== type
|
||||
)) {
|
||||
if (!currentMessageList || (
|
||||
currentMessageList.chatId !== id
|
||||
|| currentMessageList.threadId !== threadId
|
||||
|| currentMessageList.type !== type
|
||||
)) {
|
||||
if (id) {
|
||||
global = replaceTabThreadParam(global, id, threadId, 'replyStack', [], tabId);
|
||||
|
||||
global = updateTabState(global, {
|
||||
activeReactions: {},
|
||||
}, tabId);
|
||||
}
|
||||
|
||||
global = exitMessageSelectMode(global, tabId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user