Skip to content

Commit

Permalink
refactor: call on_ready after initializing the activity manager
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Dec 20, 2024
1 parent 5d8faf2 commit 378ade3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lua/cord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ function M.initialize()

local ActivityManager = require 'cord.activity.manager'

if config.values.hooks.on_ready then
config.values.hooks.on_ready()
end

M.producer:initialize(config.values)

ActivityManager.new(
Expand Down
2 changes: 2 additions & 0 deletions lua/cord/activity/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ function ActivityManager:run()
self:setup_autocmds()
if self.config.usercmds then self:setup_usercmds() end
self:queue_update(true)

if self.config.hooks.on_ready then self.config.hooks.on_ready() end
end

---Check if the activity should be updated to idle
Expand Down

0 comments on commit 378ade3

Please sign in to comment.