!349 AppStorage.Link替换成.Get

Merge pull request !349 from zhangpan/vod-25777-master
This commit is contained in:
openharmony_ci
2023-05-27 06:20:37 +00:00
committed by Gitee
6 changed files with 15 additions and 11 deletions
@@ -38,7 +38,7 @@ export default struct ComplexToggleComponent {
linkItemData() {
Log.showDebug(TAG, `linkItemData, keyId: ${this.keyId}`);
this.mItemData = AppStorage.Link('ControlCenter_' + this.keyId).get();
this.mItemData = AppStorage.Get('ControlCenter_' + this.keyId);
Log.showDebug(TAG, `linkItemData, mItemData: ${this.keyId} ${this.mItemData.label} ${this.mItemData.iconUrl}`);
}
@@ -43,7 +43,7 @@ export default struct SimpleToggleComponent {
linkItemData() {
Log.showDebug(TAG, `linkItemData, keyId: ${this.keyId}`);
this.mItemData = AppStorage.Link('ControlCenter_' + this.keyId).get();
this.mItemData = AppStorage.Get('ControlCenter_' + this.keyId);
Log.showDebug(TAG, `linkItemData, mItemData: ${this.keyId} ${this.mItemData.label} ${this.mItemData.iconUrl}`);
}
@@ -58,11 +58,15 @@ export default struct IconItemComponent {
}
linkItemData() {
this.mItemData = AppStorage.Link('StatusBar_' + this.keyId).get()
this.mItemData = AppStorage.Get('StatusBar_' + this.keyId)
Log.showInfo(TAG, `linkItemData, mItemData: ${this.keyId} ${this.mItemData.label} ${
this.mItemData
.iconUrl}`)
this.mItemStatus = AppStorage.SetAndLink('StatusBar_Status_' + this.keyId, { selected: false }).get()
const statusBarStatusKey = 'StatusBar_Status_' + this.keyId
AppStorage.SetOrCreate(statusBarStatusKey, { selected: false })
this.mItemStatus = AppStorage.Get(statusBarStatusKey)
// this.mItemStatus = AppStorage.SetAndLink('StatusBar_Status_' + this.keyId, { selected: false }).get()
}
build() {
@@ -43,7 +43,7 @@ export default struct MetaIconItemComponent {
}
linkItemData() {
this.mItemData = AppStorage.Link('StatusBar_' + this.keyId).get();
this.mItemData = AppStorage.Get('StatusBar_' + this.keyId);
Log.showInfo(TAG, `linkItemData, mItemData: ${this.keyId} ${this.mItemData.label} ${
this.mItemData
.iconUrl}`)
@@ -117,11 +117,11 @@ struct Index {
Log.showDebug(TAG, `onBannerNoticeShow start`);
let winInfoNotice = WindowManager.getWindowInfo(WindowType.NOTIFICATION_PANEL);
let bannerDisabledFlg = false;
let screenLockStatusInfo = AppStorage.Link('lockStatus');
let screenLockStatus = ScreenLockStatus.Unlock;
if (!!screenLockStatusInfo) {
// let screenLockStatusInfo = AppStorage.Link('lockStatus');
// let screenLockStatus = ScreenLockStatus.Unlock;
// if (!!screenLockStatusInfo) {
// screenLockStatus = screenLockStatusInfo.get();
}
// }
// if (screenLockStatus == ScreenLockStatus.Locking) {
// bannerDisabledFlg = true;
// } else
@@ -117,8 +117,8 @@ struct Index {
Log.showDebug(TAG, `onBannerNoticeShow start`);
let windowInfoDrop = WindowManager.getWindowInfo(WindowType.DROPDOWN_PANEL);
let bannerDisabledFlg = false;
let screenLockStatusInfo = AppStorage.Link('lockStatus');
let screenLockStatus = ScreenLockStatus.Unlock;
// let screenLockStatusInfo = AppStorage.Link('lockStatus');
// let screenLockStatus = ScreenLockStatus.Unlock;
// if (!!screenLockStatusInfo) {
// screenLockStatus = screenLockStatusInfo.get();
// }