Changeset View
Changeset View
Standalone View
Standalone View
web/selectors/thread-selectors.js
Show All 28 Lines | (event: SyntheticEvent<HTMLElement>) => { | ||||
const { id: threadID } = thread; | const { id: threadID } = thread; | ||||
let payload; | let payload; | ||||
if (threadID.includes('pending')) { | if (threadID.includes('pending')) { | ||||
payload = { | payload = { | ||||
chatMode: 'view', | chatMode: 'view', | ||||
activeChatThreadID: threadID, | activeChatThreadID: threadID, | ||||
pendingThread: thread, | pendingThread: thread, | ||||
tab: 'chat', | |||||
}; | }; | ||||
} else { | } else { | ||||
payload = { | payload = { | ||||
chatMode: 'view', | chatMode: 'view', | ||||
activeChatThreadID: threadID, | activeChatThreadID: threadID, | ||||
tab: 'chat', | |||||
}; | }; | ||||
} | } | ||||
dispatch({ type: updateNavInfoActionType, payload }); | dispatch({ type: updateNavInfoActionType, payload }); | ||||
}, | }, | ||||
[dispatch, thread], | [dispatch, thread], | ||||
); | ); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |