diff --git a/lua/github_presence/github.lua b/lua/github_presence/github.lua index 1c34413..b715272 100644 --- a/lua/github_presence/github.lua +++ b/lua/github_presence/github.lua @@ -1,5 +1,3 @@ -local notify = require "github_presence.notify" - local M = {} function M.set_status(activity) @@ -7,7 +5,6 @@ function M.set_status(activity) local _ = vim.fn.systemlist( string.format("github-status --message 'Currently editting: %s'", activity.file) ) - notify.info "set status" end return M diff --git a/lua/github_presence/timer.lua b/lua/github_presence/timer.lua index 7df923d..61f9bb5 100644 --- a/lua/github_presence/timer.lua +++ b/lua/github_presence/timer.lua @@ -7,7 +7,10 @@ return { timer:start( 1000, 1000 * 60, - vim.schedule_wrap(function() github.set_status(updates.last_activity) end) + vim.schedule_wrap(function() + if updates.last_activity == nil then return end + github.set_status(updates.last_activity) + end) ) end, }