Skip to content

Commit

Permalink
fix: sending identical updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Apr 11, 2024
1 parent a12a341 commit 76699c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/cord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ local function should_update_presence(current_presence)
end

local function update_idle_presence(config)
if last_presence['idle'] then
return false
end
if config.idle.show_idle and (config.idle.timeout == 0 or (os.clock() - last_updated) * 1000 >= config.idle.timeout) then
if config.idle.disable_on_focus and is_focused then
return false
Expand Down

0 comments on commit 76699c5

Please sign in to comment.