fix: remove unnecessary logic for draft saving

This commit is contained in:
GleidsonDaniel 2024-03-27 14:29:31 -03:00
parent 472258a7fe
commit 4854579e21
1 changed files with 0 additions and 4 deletions

View File

@ -8,7 +8,6 @@ import { Encryption } from '../encryption';
import { E2EType, IMessage, IUser, TMessageModel } from '../../definitions';
import sdk from '../services/sdk';
import { E2E_MESSAGE_TYPE, E2E_STATUS, messagesStatus } from '../constants';
import { saveDraftMessage } from './draftMessage';
const changeMessageStatus = async (id: string, status: number, tmid?: string, message?: IMessage) => {
const db = database.active;
@ -232,9 +231,6 @@ export async function sendMessage(
}
await sendMessageCall(message);
// clear draft message when message is sent and app is in background or closed
// do not affect the user experience when the app is in the foreground because the hook useAutoSaveDraft will handle it
saveDraftMessage({ rid, tmid, draftMessage: '' });
} catch (e) {
log(e);
}