1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed tsc build

This commit is contained in:
Laurent Cozic 2021-06-21 21:31:40 +01:00
parent 7c92015fe6
commit 8e712eacf5
4 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -357,7 +357,7 @@ export interface Item extends WithDates, WithUuid {
jop_share_id?: Uuid;
jop_type?: number;
jop_encryption_applied?: number;
jop_updated_time?: string;
jop_updated_time?: number;
}
export interface UserItem extends WithDates {

View File

@ -160,9 +160,10 @@ export default class ChangeModel extends BaseModel<Change> {
const items: Item[] = await this.db('items').select('id', 'jop_updated_time').whereIn('items.id', changes.map(c => c.item_id));
let finalChanges: DeltaChange[] = this.compressChanges(changes);
finalChanges = await this.removeDeletedItems(finalChanges, items);
finalChanges = finalChanges.map(c => {
let processedChanges = this.compressChanges(changes);
processedChanges = await this.removeDeletedItems(processedChanges, items);
const finalChanges: DeltaChange[] = processedChanges.map(c => {
const item = items.find(item => item.id === c.item_id);
if (!item) return c;
return {

View File

@ -42,6 +42,7 @@ const propertyTypes: Record<string, string> = {
'notifications.level': 'NotificationLevel',
'shares.type': 'ShareType',
'items.content': 'Buffer',
'items.jop_updated_time': 'number',
'share_users.status': 'ShareUserStatus',
'emails.sender_id': 'EmailSender',
'emails.sent_time': 'number',