mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-08 22:27:44 +02:00
Fix exception in app
This commit is contained in:
@@ -476,6 +476,9 @@ export class NavigationDialogManager {
|
||||
|
||||
hide() {
|
||||
this.clearGamepadHoldingInterval();
|
||||
if (!this.isShowing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Unlock scroll bar
|
||||
document.body.classList.remove('bx-no-scroll');
|
||||
|
@@ -120,11 +120,15 @@ export class BxEventBus<TEvents extends Record<string, any>> {
|
||||
|
||||
// Call method inside Android app
|
||||
if (AppInterface) {
|
||||
if (event in this.appJsInterfaces) {
|
||||
const method = this.appJsInterfaces[event];
|
||||
AppInterface[method] && AppInterface[method]();
|
||||
} else {
|
||||
AppInterface.onEventBus(this.group + '.' + (event as string));
|
||||
try {
|
||||
if (event in this.appJsInterfaces) {
|
||||
const method = this.appJsInterfaces[event];
|
||||
AppInterface[method] && AppInterface[method]();
|
||||
} else {
|
||||
AppInterface.onEventBus(this.group + '.' + (event as string));
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user