web: remove unnecessary code

This commit is contained in:
Abdullah Atta
2023-07-04 22:05:15 +05:00
parent fc5507bdd3
commit c68e380a0f
2 changed files with 0 additions and 11 deletions

View File

@@ -54,7 +54,6 @@ export default function AppEffects({ setShow }) {
const addReminder = useStore((store) => store.addReminder);
const initUser = useUserStore((store) => store.init);
const initStore = useStore((store) => store.init);
const initNotes = useNotesStore((store) => store.init);
const initAttachments = useAttachmentStore((store) => store.init);
const setIsVaultCreated = useStore((store) => store.setIsVaultCreated);
const setTheme = useThemeStore((store) => store.setTheme);
@@ -86,7 +85,6 @@ export default function AppEffects({ setShow }) {
initStore();
initAttachments();
refreshNavItems();
initNotes();
initEditorStore();
(async function () {

View File

@@ -44,15 +44,6 @@ class NoteStore extends BaseStore {
Config.set("notes:viewMode", viewMode);
};
init = () => {
EV.subscribe(EVENTS.noteRemoved, (id) => {
const { session } = editorStore.get();
if (session.id === id) {
hashNavigate("/notes/create", { addNonce: true });
}
});
};
setSelectedNote = (id) => {
if (!id) selectionStore.get().toggleSelectionMode(false);
this.set((state) => (state.selectedNote = id));