overhauled button pressed backStack behaviour...use a JS callback to let it work with JS calls

This commit is contained in:
Philipp Schaefer
2013-06-14 16:49:54 +02:00
parent cc44392d03
commit d21fdc0176
5 changed files with 72 additions and 40 deletions

View File

@ -2,6 +2,9 @@
//
window.show = function(id) {
window.hideall();
if (typeof android !== 'undefined' && android && android.switchToPane) {
android.switchToPane(id);
}
switch(id) {
case 'full':
window.chat.show('full');

View File

@ -91,11 +91,7 @@ window.runOnSmartphonesAfterBoot = function() {
// this is a hack, accessing Leaflets private _container is evil
$(this._container).on('taphold', function() {
window.renderPortalDetails(guid);
if (typeof android !== 'undefined' && android && android.portalLongPressed) {
android.portalLongPressed();
} else {
window.smartphone.sideButton.click();
}
window.show('info');
});
});
});