Fix song sharing on iDevice

This commit is contained in:
An Phan 2016-07-11 22:45:29 +08:00
parent 7ab5c76ef0
commit e69c989a1f
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2
2 changed files with 2 additions and 4 deletions

View file

@ -77,9 +77,6 @@ export default {
playback.init(); playback.init();
hideOverlay(); hideOverlay();
// Load the default view.
router.go('home');
// Ask for user's notification permission. // Ask for user's notification permission.
this.requestNotifPermission(); this.requestNotifPermission();

View file

@ -74,7 +74,7 @@ export default {
if (isMobile.apple.device) { if (isMobile.apple.device) {
// Mobile Safari doesn't allow autoplay, so we just queue. // Mobile Safari doesn't allow autoplay, so we just queue.
queueStore.queue(song); queueStore.queue(song);
this.go('queue'); this.parent.go('queue');
} else { } else {
playback.queueAndPlay(song); playback.queueAndPlay(song);
} }
@ -82,6 +82,7 @@ export default {
}, },
init() { init() {
this.routes.parent = this;
this.loadState(); this.loadState();
window.addEventListener('popstate', () => this.loadState(), true); window.addEventListener('popstate', () => this.loadState(), true);
}, },