From 7feb40ddf4734848821cfdfa7f3e9733d2bfbe2c Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 18 Mar 2020 12:31:28 +0500 Subject: [PATCH] cleanup --- .../src/components/SelectionHeader/index.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/apps/mobile/src/components/SelectionHeader/index.js b/apps/mobile/src/components/SelectionHeader/index.js index 4a4445b9e..372e35d0f 100644 --- a/apps/mobile/src/components/SelectionHeader/index.js +++ b/apps/mobile/src/components/SelectionHeader/index.js @@ -165,28 +165,6 @@ export const SelectionHeader = () => { onPress={async () => { eSendEvent(eOpenSimpleDialog, TEMPLATE_DELETE('item')); return; - if (selectedItemsList.length > 0) { - let noteIds = []; - selectedItemsList.forEach(item => { - noteIds.push(item.id); - }); - if (currentScreen === 'notebooks') { - await db.notebooks.delete(...noteIds); - dispatch({type: ACTIONS.NOTEBOOKS}); - ToastEvent.show('Notebooks moved to trash'); - } else if (currentScreen === 'notebook') { - ToastEvent.show('Topics moved to trash'); - // TODO - } else { - await db.notes.delete(...noteIds); - dispatch({type: ACTIONS.NOTES}); - ToastEvent.show('Notes moved to trash'); - } - - dispatch({type: ACTIONS.SELECTION_MODE, enabled: false}); - - dispatch({type: ACTIONS.CLEAR_SELECTION}); - } }}>