diff options
| author | Pliable Pixels <pliablepixels@users.noreply.github.com> | 2020-09-05 08:00:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-05 08:00:45 -0400 |
| commit | 058fcb07bf1529339fa5c18cab233c48cdce6a1b (patch) | |
| tree | 4900fbda885dc985cd936bb20cdac63284fce604 /www/js/MontageCtrl.js | |
| parent | e54b8659ff385c667b7590bc383e8315769d47a7 (diff) | |
| parent | 1a4449aeadeb88db971f0960d14fd679a7364dbb (diff) | |
Merge pull request #963 from lucasnz/master
Event list improvements
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 967decfe..c3500aee 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -2611,15 +2611,20 @@ angular.module('zmApp.controllers') var ld = NVR.getLogin(); mid = monitor.Monitor.Id; // always use server tz to avoid confusion + var lastCheckTime = ld.lastEventCheckTimes[mid]; ld.lastEventCheckTimes[mid] = (new moment()).tz(NVR.getTimeZoneNow()).format('YYYY-MM-DD HH:mm:ss'); - NVR.debug ("Updating monitor:"+mid+" event check time (server tz) to " + ld.lastEventCheckTimes[mid] ); + NVR.debug ("Updating monitor:"+mid+" event check time (server tz) to " + lastCheckTime); NVR.setLogin(ld); + if (!monitor.Monitor.lastEvent) { + lastCheckTime = ""; + } monitor.Monitor.lastEvent = undefined; monitor.Monitor.showSidebar = false; if (!showEvents) return; $state.go("app.events", { "id": monitor.Monitor.Id, - "playEvent": false + "playEvent": false, + "lastCheckTime": lastCheckTime }); return; |
