mirror of
https://gitee.com/openharmony/applications_launcher
synced 2024-11-26 16:41:58 +00:00
!586 手势导航的设置方式很难找到,不易发现
Merge pull request !586 from 陈锐/OpenHarmony-4.1-Release-1025
This commit is contained in:
commit
9b13255c72
@ -19,7 +19,9 @@ import { Log } from '@ohos/common';
|
||||
const TAG = 'Launcher Settings MainAbility';
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
private abilityWant;
|
||||
onCreate(want, launchParam) {
|
||||
this.abilityWant = want;
|
||||
Log.showInfo(TAG, 'onCreate is called');
|
||||
}
|
||||
|
||||
@ -29,6 +31,11 @@ export default class MainAbility extends Ability {
|
||||
|
||||
onWindowStageCreate(windowStage) {
|
||||
Log.showInfo(TAG, 'onWindowStageCreate is called');
|
||||
if (this.abilityWant?.parameters?.router === 'settings') {
|
||||
globalThis.router = 'settings';
|
||||
} else {
|
||||
globalThis.router = '';
|
||||
}
|
||||
globalThis.settingsContext = this.context;
|
||||
windowStage.setUIContent(this.context, 'pages/Settings', null);
|
||||
}
|
||||
|
@ -133,10 +133,18 @@ export default class SettingsPresenter {
|
||||
*/
|
||||
settingUpdate() {
|
||||
Log.showDebug(TAG, 'settingUpdate start');
|
||||
globalThis.settingsContext.terminateSelf()
|
||||
.then(data => Log.showDebug(TAG, 'terminateSelf promise::then : ' + data))
|
||||
.catch(error => Log.showError(TAG, 'terminateSelf promise::catch : ' + error));
|
||||
Log.showDebug(TAG, 'terminateSelf end');
|
||||
if (globalThis.router === 'settings') {
|
||||
globalThis.settingsContext.startAbility({
|
||||
deviceId: '',
|
||||
bundleName: 'com.ohos.settings',
|
||||
abilityName: 'com.ohos.settings.MainAbility',
|
||||
});
|
||||
} else {
|
||||
globalThis.settingsContext.terminateSelf()
|
||||
.then(data => Log.showDebug(TAG, 'terminateSelf promise::then : ' + data))
|
||||
.catch(error => Log.showError(TAG, 'terminateSelf promise::catch : ' + error));
|
||||
Log.showDebug(TAG, 'terminateSelf end');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,6 +94,7 @@ export default class SmartDockModel {
|
||||
|
||||
if (CheckEmptyUtils.isEmptyArr(rdbResidentList) && !this.mSmartDockLayoutConfig.isConfigExist()) {
|
||||
// init preset dock data
|
||||
|
||||
const dockDataList = this.mSmartDockLayoutConfig.getDockLayoutInfo();
|
||||
Log.showDebug(TAG, `getResidentList from config length: ${dockDataList.length}`);
|
||||
for (let i = 0; i < dockDataList.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user