get secretkey on the fly when re-encrypting

This commit is contained in:
2024-09-11 18:44:24 +03:00
parent cd7ea381c1
commit 540cb45d98
4 changed files with 112 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
import React, { useCallback, useState, useEffect, useRef, useMemo } from 'react';
import { List, AutoSizer, CellMeasurerCache, CellMeasurer } from 'react-virtualized';
import { MessageItem } from './MessageItem';
import { subscribeToEvent, unsubscribeFromEvent } from '../../utils/events';
const cache = new CellMeasurerCache({
fixedWidth: true,
@@ -70,6 +71,19 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages }) => {
}
};
const sentNewMessageGroupFunc = ()=> {
scrollToBottom()
}
useEffect(() => {
subscribeToEvent("sent-new-message-group", sentNewMessageGroupFunc);
return () => {
unsubscribeFromEvent("sent-new-message-group", sentNewMessageGroupFunc);
};
}, [messages]);
const rowRenderer = ({ index, key, parent, style }) => {