perf: 是否允许发送自由输入. (暂未知明确规则)

dev/mobile
Lei OT 2 years ago
parent 7242c039c8
commit ab08dc9e62

@ -57,9 +57,9 @@ const InputComposer = ({ mobile }) => {
const sentOrReceivedNewMessage = useConversationStore((state) => state.sentOrReceivedNewMessage);
const talkabled = !isEmpty(currentConversation.sn) && websocketOpened;
const isExpired = dayjs(currentConversation.conversation_expiretime).add(8, 'hours').isBefore(dayjs());
const gt24h = currentConversation.last_received_time ? dayjs().diff(dayjs(currentConversation.last_received_time), 'hour') > 24 : true;
const textabled = talkabled && (!gt24h || !isExpired); // ,
const isExpired = !isEmpty(currentConversation.conversation_expiretime) ? dayjs(currentConversation.conversation_expiretime).add(8, 'hours').isBefore(dayjs()) : true;
const gt24h = !isEmpty(currentConversation.last_received_time) ? dayjs().diff(dayjs(currentConversation.last_received_time), 'hour') > 24 : true;
const textabled = talkabled && (!(gt24h && isExpired)); // ,
const textInputRef = useRef(null);
const [textContent, setTextContent] = useState('');

Loading…
Cancel
Save