mirror of
https://gitee.com/openharmony/applications_launcher
synced 2024-11-27 00:51:34 +00:00
fix:update open bigfolder app badgenumber
Signed-off-by: wzp <wuzhipeng1@huawei.com>
This commit is contained in:
parent
e5fe9fe131
commit
b41ee3b5ae
@ -20,7 +20,8 @@ import {
|
||||
PresetStyleConstants,
|
||||
localEventManager,
|
||||
EventConstants,
|
||||
CardItemInfo
|
||||
CardItemInfo,
|
||||
FolderData
|
||||
} from '@ohos/common';
|
||||
import AppItem from './AppItem';
|
||||
import FormItem from './FormItem';
|
||||
@ -71,6 +72,19 @@ export default struct SwiperPage {
|
||||
|
||||
private updateAppListInfo(): void {
|
||||
this.mAppListInfo = this.appListInfo.appGridInfo[this.swiperPage];
|
||||
this.updateOpenFolderData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听桌面元素变化时,更新打开的大文件的数据。
|
||||
* eg:应用角标更新时,大文件内的应用角标同步更新。
|
||||
*/
|
||||
updateOpenFolderData() {
|
||||
const openFolderData = AppStorage.get('openFolderData') as FolderData;
|
||||
if (openFolderData?.folderId && this.mAppListInfo.length) {
|
||||
let temp = this.mAppListInfo.find((item: LauncherDragItemInfo) => item?.folderId === openFolderData.folderId);
|
||||
AppStorage.setOrCreate('openFolderData', temp as FolderData);
|
||||
}
|
||||
}
|
||||
|
||||
aboutToAppear(): void {
|
||||
|
Loading…
Reference in New Issue
Block a user