From 56b4742bac3d94d8976ef5bb0ae7a8e0c85f3724 Mon Sep 17 00:00:00 2001 From: Diogo Duarte Date: Thu, 21 Mar 2024 19:51:50 +0000 Subject: [PATCH] fix bug where it was required to run the function --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 6104584..34526d9 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ local save_bookmark = ya.sync(function(state, idx) cursor = folder.cursor, } - if state.notify.enable then + if state.notify and state.notify.enable then local message = state.notify.message.new message, _ = message:gsub("", SUPPORTED_KEYS[idx].on) message, _ = message:gsub("", tostring(folder.cwd)) @@ -39,7 +39,7 @@ end) local all_bookmarks = ya.sync(function(state) return state.bookmarks or {} end) local delete_bookmark = ya.sync(function(state, idx) - if state.notify.enable then + if state.notify and state.notify.enable then local message = state.notify.message.delete message, _ = message:gsub("", state.bookmarks[idx].on) message, _ = message:gsub("", state.bookmarks[idx].desc) @@ -56,7 +56,7 @@ end) local delete_all_bookmarks = ya.sync(function(state) state.bookmarks = nil - if state.notify.enable then + if state.notify and state.notify.enable then ya.notify { title = "Bookmarks", content = state.notify.message.delete_all,