use longer update interval for web

This commit is contained in:
zadam
2021-02-27 21:08:27 +01:00
parent 3fe87259e2
commit 3c7a6bc1e4
3 changed files with 8 additions and 6 deletions

View File

@@ -54,6 +54,8 @@ export default class NoteDetailWidget extends TabAwareWidget {
this.typeWidgets = {};
const updateInterval = utils.isDesktop() ? 1000 : 5000;
this.spacedUpdate = new SpacedUpdate(async () => {
const {note} = this.tabContext;
const {noteId} = note;
@@ -64,7 +66,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
protectedSessionHolder.touchProtectedSessionIfNecessary(note);
await server.put('notes/' + noteId, dto, this.componentId);
});
}, updateInterval);
}
isEnabled() {