Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: simplify deleting topic

ammarahm-ed5a965f6d52d9
diff --git a/apps/mobile/app/components/sheets/topic-sheet/index.tsx b/apps/mobile/app/components/sheets/topic-sheet/index.tsx
index 1eec5f3cd..b7a2178c3 100644
--- a/apps/mobile/app/components/sheets/topic-sheet/index.tsx
+++ b/apps/mobile/app/components/sheets/topic-sheet/index.tsx
@@ -336,23 +336,10 @@ export const TopicsSheet = () => {
useSelectionStore.setState({
selectedItemsList: selection
});
- presentDialog({
- title: `Delete ${
- selection.length > 1 ? "topics" : "topics"
- }`,
- paragraph: `Are you sure you want to delete ${
- selection.length > 1 ? "these topics?" : "this topic?"
- }`,
- positiveText: "Delete",
- negativeText: "Cancel",
- positivePress: async () => {
- await deleteItems();
- useSelectionStore.getState().clearSelection();
- setEnabled(false);
- setSelection([]);
- },
- positiveType: "errorShade"
- });
+ await deleteItems();
+ useSelectionStore.getState().clearSelection();
+ setEnabled(false);
+ setSelection([]);
return;
}}
color={colors.primary.icon}