mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove sending to false on first loade page
This commit is contained in:
@@ -80,6 +80,17 @@ export class MessageLocalDataSourceService {
|
||||
// })
|
||||
}
|
||||
|
||||
async setAllSenderToFalse() {
|
||||
try {
|
||||
await messageDataSource.transaction('rw', messageDataSource.message, async () => {
|
||||
// Perform the update operation within the transaction
|
||||
await messageDataSource.message.toCollection().modify({ sending: false });
|
||||
});
|
||||
console.log('All messages updated successfully.');
|
||||
} catch (error) {
|
||||
console.error('Error updating messages:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async getLastMessageByRoomId(roomId: string): Promise<Result<undefined|TableMessage, any>> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user