mirror of
https://gitee.com/openharmony/applications_launcher
synced 2024-11-23 06:50:02 +00:00
!449 fix:修复拖动图标结束后,取消通知,数字角标未及时更新的问题
Merge pull request !449 from giteewzp/master2023121401
This commit is contained in:
commit
599ff1603d
@ -21,7 +21,8 @@ import {
|
||||
localEventManager,
|
||||
EventConstants,
|
||||
CardItemInfo,
|
||||
FolderData
|
||||
FolderData,
|
||||
BadgeManager
|
||||
} from '@ohos/common';
|
||||
import AppItem from './AppItem';
|
||||
import FormItem from './FormItem';
|
||||
@ -262,6 +263,10 @@ export default struct SwiperPage {
|
||||
const dragResult = PageDesktopDragHandler.getInstance().onDragDrop(event.getWindowX(), event.getWindowY());
|
||||
Log.showInfo(TAG, `onDrop dragResult: ${dragResult}`);
|
||||
AppStorage.setOrCreate('selectAppIndex', null);
|
||||
const dragItemInfo: LauncherDragItemInfo = AppStorage.get('dragItemInfo') as LauncherDragItemInfo;
|
||||
if (dragItemInfo.bundleName) {
|
||||
BadgeManager.getInstance().updateBadgeNumber(dragItemInfo.bundleName, dragItemInfo.badgeNumber);
|
||||
}
|
||||
if (!dragResult) {
|
||||
AppStorage.setOrCreate<LauncherDragItemInfo>('dragItemInfo', new LauncherDragItemInfo());
|
||||
} else {
|
||||
|
@ -24,7 +24,8 @@ import {
|
||||
StyleConstants,
|
||||
ResourceManager,
|
||||
Log,
|
||||
MenuInfo
|
||||
MenuInfo,
|
||||
BadgeManager
|
||||
} from '@ohos/common';
|
||||
import { SmartDockStyleConfig } from '../config/SmartDockStyleConfig';
|
||||
import SmartDockDragHandler from '../common/SmartDockDragHandler';
|
||||
@ -122,6 +123,10 @@ export default struct ResidentLayout {
|
||||
Log.showInfo(TAG, `onDrop event: [${event.getWindowX()}, ${event.getWindowY()}]`);
|
||||
const dragResult = SmartDockDragHandler.getInstance().onDragDrop(event.getWindowX(), event.getWindowY());
|
||||
AppStorage.setOrCreate('selectAppIndex', null);
|
||||
const dragItemInfo: LauncherDragItemInfo = AppStorage.get('dragItemInfo') as LauncherDragItemInfo;
|
||||
if (dragItemInfo.bundleName) {
|
||||
BadgeManager.getInstance().updateBadgeNumber(dragItemInfo.bundleName, dragItemInfo.badgeNumber);
|
||||
}
|
||||
if (!dragResult) {
|
||||
AppStorage.setOrCreate<LauncherDragItemInfo>('dragItemInfo', new LauncherDragItemInfo());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user