Use minimal replacement class for MessageModel
This commit is contained in:
parent
6b00cf756e
commit
f846678b90
95 changed files with 3919 additions and 4457 deletions
|
@ -19,6 +19,7 @@ import { queueUpdateMessage } from '../util/messageBatcher';
|
|||
import { AttachmentDownloadUrgency } from '../jobs/AttachmentDownloadManager';
|
||||
import { isAciString } from '../util/isAciString';
|
||||
import { DataReader, DataWriter } from '../sql/Client';
|
||||
import { MessageModel } from '../models/messages';
|
||||
|
||||
export const viewSyncTaskSchema = z.object({
|
||||
type: z.literal('ViewSync').readonly(),
|
||||
|
@ -114,11 +115,7 @@ export async function onSync(sync: ViewSyncAttributesType): Promise<void> {
|
|||
|
||||
notificationService.removeBy({ messageId: found.id });
|
||||
|
||||
const message = window.MessageCache.__DEPRECATED$register(
|
||||
found.id,
|
||||
found,
|
||||
'ViewSyncs.onSync'
|
||||
);
|
||||
const message = window.MessageCache.register(new MessageModel(found));
|
||||
let didChangeMessage = false;
|
||||
|
||||
if (message.get('readStatus') !== ReadStatus.Viewed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue