all talks: only show 'in xxx min' for talks less than 30min in the future

This commit is contained in:
Franzi 2023-09-30 09:33:38 +02:00
parent 8122666857
commit d7e0fc8a47

View file

@ -266,7 +266,7 @@ local function view_all_talks(starts, ends, config, x1, y1, x2, y2)
local delta = talk.start_ts - time local delta = talk.start_ts - time
if delta > -60 and delta < 60 then if delta > -60 and delta < 60 then
talk_time = "Now" talk_time = "Now"
elseif delta > 180*60 then elseif delta > 30*60 then
talk_time = talk.start_str talk_time = talk.start_str
elseif delta > 0 then elseif delta > 0 then
talk_time = string.format("in %d min", math.floor(delta/60)+1) talk_time = string.format("in %d min", math.floor(delta/60)+1)