mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(app): statusTap and hardwareGB can be activated with config
fixes #15617
This commit is contained in:
@ -18,10 +18,12 @@ export class App implements ComponentInterface {
|
|||||||
|
|
||||||
componentDidLoad() {
|
componentDidLoad() {
|
||||||
rIC(() => {
|
rIC(() => {
|
||||||
importTapClick(this.win);
|
const { win, config, queue } = this;
|
||||||
importInputShims(this.win, this.config);
|
|
||||||
importStatusTap(this.win, this.queue);
|
importTapClick(win);
|
||||||
importHardwareBackButton(this.win);
|
importInputShims(win, config);
|
||||||
|
importStatusTap(win, config, queue);
|
||||||
|
importHardwareBackButton(win, config);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,14 +36,16 @@ export class App implements ComponentInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function importHardwareBackButton(win: Window) {
|
function importHardwareBackButton(win: Window, config: Config) {
|
||||||
if (isPlatform(win, 'hybrid')) {
|
const hardwareBackConfig = config.getBoolean('hardwareBackButton', isPlatform(win, 'hybrid'));
|
||||||
|
if (hardwareBackConfig) {
|
||||||
import('../../utils/hardware-back-button').then(module => module.startHardwareBackButton(win));
|
import('../../utils/hardware-back-button').then(module => module.startHardwareBackButton(win));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function importStatusTap(win: Window, queue: QueueApi) {
|
function importStatusTap(win: Window, config: Config, queue: QueueApi) {
|
||||||
if (isPlatform(win, 'hybrid')) {
|
const statusTap = config.getBoolean('statusTap', isPlatform(win, 'hybrid'));
|
||||||
|
if (statusTap) {
|
||||||
import('../../utils/status-tap').then(module => module.startStatusTap(win, queue));
|
import('../../utils/status-tap').then(module => module.startStatusTap(win, queue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ export interface IonicConfig {
|
|||||||
*/
|
*/
|
||||||
mode?: Mode;
|
mode?: Mode;
|
||||||
persistConfig?: boolean;
|
persistConfig?: boolean;
|
||||||
|
hardwareBackButton?: boolean;
|
||||||
|
statusTap?: boolean;
|
||||||
|
|
||||||
inputShims?: boolean;
|
inputShims?: boolean;
|
||||||
backButtonIcon?: string;
|
backButtonIcon?: string;
|
||||||
|
Reference in New Issue
Block a user