Redirect to the index page when rebooting the app from the settings page

This commit is contained in:
Thibaut Courouble 2018-11-25 17:04:04 -05:00
parent bf003669ba
commit 66cba23d9c
2 changed files with 2 additions and 6 deletions

View file

@ -158,7 +158,7 @@
@updateChecker = new app.UpdateChecker()
reboot: ->
if location.pathname isnt '/'
if location.pathname isnt '/' and location.pathname isnt '/settings'
window.location = "/##{location.pathname}"
else
window.location = '/'

View file

@ -27,11 +27,7 @@ class app.AppCache
return
reload: ->
$.on @cache, 'updateready noupdate error', ->
if location.pathname isnt '/'
window.location = "/##{location.pathname}"
else
window.location = '/'
$.on @cache, 'updateready noupdate error', -> app.reboot()
@notifyUpdate = false
@notifyProgress = true
try @cache.update() catch