diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-25 17:03:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 17:03:24 -0500 |
commit | 98e089b8e5675fb6b1a91132af090947423f4503 (patch) | |
tree | 31f44c1e8eff739d1ccf2000a5e72ec0f97bbb9b /internal/notices/notices.go | |
parent | 4b54e4449052df210af33f679001727a9c12b7d4 (diff) |
fix: initial color notice didn't expire (#15)
* Accept initial color using -c flag
* fix: Initial color notice expiry
* Inform user of detected initial color
Diffstat (limited to 'internal/notices/notices.go')
-rw-r--r-- | internal/notices/notices.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/notices/notices.go b/internal/notices/notices.go index 4fbd807..40b5d1f 100644 --- a/internal/notices/notices.go +++ b/internal/notices/notices.go @@ -58,3 +58,10 @@ func (m Model) New(msg string) tea.Cmd { return NoticeExpiryMsg(uuid) } } + +func (m Model) Reset(uuid string) tea.Cmd { + return func() tea.Msg { + time.Sleep(expiryDelay * time.Second) + return NoticeExpiryMsg(uuid) + } +} |