diff --git a/features/controlcentercomponent/src/main/ets/com/ohos/pages/ComplexToggleComponent.ets b/features/controlcentercomponent/src/main/ets/com/ohos/pages/ComplexToggleComponent.ets index 2b1371c4..973aaf84 100644 --- a/features/controlcentercomponent/src/main/ets/com/ohos/pages/ComplexToggleComponent.ets +++ b/features/controlcentercomponent/src/main/ets/com/ohos/pages/ComplexToggleComponent.ets @@ -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}`); } diff --git a/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleComponent.ets b/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleComponent.ets index a087d3a6..30b85c5f 100644 --- a/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleComponent.ets +++ b/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleComponent.ets @@ -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}`); } diff --git a/features/statusbarcomponent/src/main/ets/com/ohos/pages/IconItemComponent.ets b/features/statusbarcomponent/src/main/ets/com/ohos/pages/IconItemComponent.ets index 69ea8ad8..afca2178 100644 --- a/features/statusbarcomponent/src/main/ets/com/ohos/pages/IconItemComponent.ets +++ b/features/statusbarcomponent/src/main/ets/com/ohos/pages/IconItemComponent.ets @@ -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() { diff --git a/features/statusbarcomponent/src/main/ets/com/ohos/pages/MetaIconItemComponent.ets b/features/statusbarcomponent/src/main/ets/com/ohos/pages/MetaIconItemComponent.ets index 71aebb8e..c9e493c5 100644 --- a/features/statusbarcomponent/src/main/ets/com/ohos/pages/MetaIconItemComponent.ets +++ b/features/statusbarcomponent/src/main/ets/com/ohos/pages/MetaIconItemComponent.ets @@ -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}`) diff --git a/product/pc/notificationpanel/src/main/ets/pages/bannerNotification.ets b/product/pc/notificationpanel/src/main/ets/pages/bannerNotification.ets index 2389c37a..4feff5bf 100644 --- a/product/pc/notificationpanel/src/main/ets/pages/bannerNotification.ets +++ b/product/pc/notificationpanel/src/main/ets/pages/bannerNotification.ets @@ -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 diff --git a/product/phone/dropdownpanel/src/main/ets/pages/bannerNotification.ets b/product/phone/dropdownpanel/src/main/ets/pages/bannerNotification.ets index fab1a0ef..3a7c72c8 100644 --- a/product/phone/dropdownpanel/src/main/ets/pages/bannerNotification.ets +++ b/product/phone/dropdownpanel/src/main/ets/pages/bannerNotification.ets @@ -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(); // }