From fbb1fecd04ff4d3d90105decd236f8f64ef42582 Mon Sep 17 00:00:00 2001 From: stingl Date: Fri, 19 Nov 2021 11:47:05 +0100 Subject: [PATCH] Move method; --- js/app.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/app.js b/js/app.js index 06fb2c4..b7bdf3e 100644 --- a/js/app.js +++ b/js/app.js @@ -358,7 +358,12 @@ const TimeTrack = { color: 'blue', buttons: [ ['', function (instance, toast) { - component.restoreTrashed(); + let restoredTracker = null; + Object.assign(restoredTracker, component.trashed); + component.trashed = {}; + + component.tickets.push(restoredTracker); + component.updateStorage(); }, true] ], timeout: 12000 @@ -366,13 +371,6 @@ const TimeTrack = { this.updateStorage(); }, - restoreTrashed() { - let restoredTracker = null; - Object.assign(restoredTracker, this.trashed); - this.trashed = {}; - - this.tickets.push(restoredTracker); - }, archiveTracker(index) { if (this.tickets[index].tracking) { this.stopActiveTracker();