Slint fixes applied

This commit is contained in:
Rafael Garcia
2023-05-15 09:41:33 -05:00
parent 464ffd23b4
commit 3ac29e131d
7 changed files with 327 additions and 338 deletions

View File

@@ -335,13 +335,7 @@ export default (
labelAssociations labelAssociations
}) })
const fromJSON = (json: { const fromJSON = (json: {chats: Chat[], contacts: { [id: string]: Contact }, messages: { [id: string]: WAMessage[] }, labels: { [labelId: string]: Label }, labelAssociations: LabelAssociation[]}) => {
chats: Chat[],
contacts: { [id: string]: Contact },
messages: { [id: string]: WAMessage[] },
labels: { [labelId: string]: Label },
labelAssociations: LabelAssociation[]
}) => {
chats.upsert(...json.chats) chats.upsert(...json.chats)
labelAssociations.upsert(...json.labelAssociations || []) labelAssociations.upsert(...json.labelAssociations || [])
contactsUpsert(Object.values(json.contacts)) contactsUpsert(Object.values(json.contacts))

View File

@@ -28,4 +28,5 @@ export class ObjectRepository<T extends object> {
toJSON() { toJSON() {
return this.findAll() return this.findAll()
} }
} }

View File

@@ -15,13 +15,7 @@ export type WAReadReceiptsValue = 'all' | 'none'
/** set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send */ /** set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send */
export type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused' export type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused'
export const ALL_WA_PATCH_NAMES = [ export const ALL_WA_PATCH_NAMES = ['critical_block', 'critical_unblock_low', 'regular_high', 'regular_low', 'regular'] as const
'critical_block',
'critical_unblock_low',
'regular_high',
'regular_low',
'regular'
] as const
export type WAPatchName = typeof ALL_WA_PATCH_NAMES[number] export type WAPatchName = typeof ALL_WA_PATCH_NAMES[number]