app panel no longer opens home screen on load

This commit is contained in:
rolux 2013-07-09 09:05:24 +00:00
parent 208a38c419
commit a8039370e5

View file

@ -47,11 +47,8 @@ pandora.ui.appPanel = function() {
api: ['api'] api: ['api']
}; };
if (page === '') { if (page === '') {
if (!pandora.$ui.appPanel) { if (pandora.$ui.appPanel && pandora.$ui.home) {
// if we're on page load, show home screen // unless we're on page load, remove home screen
pandora.$ui.home = pandora.ui.home().showScreen();
} else {
// otherwise, remove home screen
pandora.$ui.home.fadeOutScreen(); pandora.$ui.home.fadeOutScreen();
} }
Ox.forEach(dialogPages, function(pages, dialog) { Ox.forEach(dialogPages, function(pages, dialog) {
@ -64,11 +61,12 @@ pandora.ui.appPanel = function() {
pandora.$ui.tv.fadeOutScreen(); pandora.$ui.tv.fadeOutScreen();
} }
} else if (page == 'home') { } else if (page == 'home') {
// if we're on page load, show screen immediately if (pandora.$ui.appPanel) {
pandora.$ui.home = pandora.ui.home()[ // unless we're on page load, show home screen
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen' pandora.$ui.home = pandora.ui.home().fadeInScreen();
](); }
} else if (page == 'tv') { } else if (page == 'tv') {
// if we're on page load, show tv immediately
pandora.$ui.tv = pandora.ui.tv()[ pandora.$ui.tv = pandora.ui.tv()[
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen' !pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
](); ]();