mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +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() {
|
||||
rIC(() => {
|
||||
importTapClick(this.win);
|
||||
importInputShims(this.win, this.config);
|
||||
importStatusTap(this.win, this.queue);
|
||||
importHardwareBackButton(this.win);
|
||||
const { win, config, queue } = this;
|
||||
|
||||
importTapClick(win);
|
||||
importInputShims(win, config);
|
||||
importStatusTap(win, config, queue);
|
||||
importHardwareBackButton(win, config);
|
||||
});
|
||||
}
|
||||
|
||||
@ -34,14 +36,16 @@ export class App implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
function importHardwareBackButton(win: Window) {
|
||||
if (isPlatform(win, 'hybrid')) {
|
||||
function importHardwareBackButton(win: Window, config: Config) {
|
||||
const hardwareBackConfig = config.getBoolean('hardwareBackButton', isPlatform(win, 'hybrid'));
|
||||
if (hardwareBackConfig) {
|
||||
import('../../utils/hardware-back-button').then(module => module.startHardwareBackButton(win));
|
||||
}
|
||||
}
|
||||
|
||||
function importStatusTap(win: Window, queue: QueueApi) {
|
||||
if (isPlatform(win, 'hybrid')) {
|
||||
function importStatusTap(win: Window, config: Config, queue: QueueApi) {
|
||||
const statusTap = config.getBoolean('statusTap', isPlatform(win, 'hybrid'));
|
||||
if (statusTap) {
|
||||
import('../../utils/status-tap').then(module => module.startStatusTap(win, queue));
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ export interface IonicConfig {
|
||||
*/
|
||||
mode?: Mode;
|
||||
persistConfig?: boolean;
|
||||
hardwareBackButton?: boolean;
|
||||
statusTap?: boolean;
|
||||
|
||||
inputShims?: boolean;
|
||||
backButtonIcon?: string;
|
||||
|
Reference in New Issue
Block a user