mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
* refactor most of the components to outside of their Session folder * finish moving overlay and memberListItem to react hook * fix bug with kicked member len >2 not being displayed also sort admins first in UpdateGroupMembers dialog * fix admin leaving text of groupNotification * add a useFocusMount hook to focus input fields on mount * make click avatar convo item open only user dialog * cleanup config default.json * make sure to use convoController to build sync message * disable showing pubkey on opengroups * add a pause on audio playback Fixes #2079
20 lines
579 B
TypeScript
20 lines
579 B
TypeScript
// keep this draft state local to not have to do a redux state update (a bit slow with our large state for some computers)
|
|
const draftsForConversations: Record<string, string> = {};
|
|
|
|
export function getDraftForConversation(conversationKey?: string) {
|
|
if (!conversationKey || !draftsForConversations[conversationKey]) {
|
|
return '';
|
|
}
|
|
return draftsForConversations[conversationKey] || '';
|
|
}
|
|
|
|
export function updateDraftForConversation({
|
|
conversationKey,
|
|
draft,
|
|
}: {
|
|
conversationKey: string;
|
|
draft: string;
|
|
}) {
|
|
draftsForConversations[conversationKey] = draft;
|
|
}
|