From 499671180c3661980a6ae3239c8cfe23c2effeb0 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 23 Feb 2024 03:40:36 +0500 Subject: [PATCH] mobile: clear selection after deleting items --- apps/mobile/app/components/selection-header/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mobile/app/components/selection-header/index.tsx b/apps/mobile/app/components/selection-header/index.tsx index ffdf8311e..c0170f3a4 100644 --- a/apps/mobile/app/components/selection-header/index.tsx +++ b/apps/mobile/app/components/selection-header/index.tsx @@ -306,7 +306,10 @@ export const SelectionHeader = React.memo( deleteItems( undefined, useSelectionStore.getState().selectionMode - ); + ).then(() => { + useSelectionStore.getState().clearSelection(); + useSelectionStore.getState().setSelectionMode(undefined); + }); }} tooltipText="Move to trash" tooltipPosition={1}