!586 手势导航的设置方式很难找到,不易发现

Merge pull request !586 from 陈锐/OpenHarmony-4.1-Release-1025
This commit is contained in:
openharmony_ci 2024-10-25 10:52:12 +00:00 committed by Gitee
commit 9b13255c72
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 20 additions and 4 deletions

View File

@ -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);
}

View File

@ -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');
}
}
/**

View File

@ -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++) {