Show offline message until page refresh is completed.
This commit is contained in:
parent
3e678a3284
commit
9384e69dd4
@ -366,13 +366,6 @@ function updateStatusOfAll () {
|
||||
}
|
||||
|
||||
function locationHashChanged () {
|
||||
if (!mopidy) {
|
||||
// Mopidy connection not yet established. User probably clicked 'Refresh' in their
|
||||
// browser and the page is still loading. We can safely ignore this call as it will
|
||||
// be invoked again later when the page has finished loading and $(document).ready()
|
||||
// is triggered.
|
||||
return false
|
||||
}
|
||||
var hash = document.location.hash.split('?')
|
||||
// remove #
|
||||
var divid = hash[0].substr(1)
|
||||
@ -404,12 +397,20 @@ function locationHashChanged () {
|
||||
break
|
||||
case 'artists':
|
||||
if (uri !== '') {
|
||||
if (mopidy) {
|
||||
library.showArtist(uri, mopidy)
|
||||
} else {
|
||||
showOffline(true) // Page refreshed - wait for mopidy object to be initialized.
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'albums':
|
||||
if (uri !== '') {
|
||||
if (mopidy) {
|
||||
library.showAlbum(uri, mopidy)
|
||||
} else {
|
||||
showOffline(true) // Page refreshed - wait for mopidy object to be initialized.
|
||||
}
|
||||
}
|
||||
break
|
||||
default: // Default footer
|
||||
|
||||
Loading…
Reference in New Issue
Block a user