Skip to content

Commit

Permalink
fix visible copy check
Browse files Browse the repository at this point in the history
  • Loading branch information
tjblackheart committed Jun 18, 2023
1 parent 49dac78 commit ee3e8cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cmd/andcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ var (
muted = color.New(color.FgHiWhite, color.Faint)

// ui
copyCmd = ""
current = "" // holds an unformatted copy of the current token
copied = false
copiedVisibleSecs = 2
copyCmd = ""
current = "" // holds an unformatted copy of the current token
copied = false
copiedVisibleMSecs = 2000

// build vars
commit = ""
Expand Down
6 changes: 3 additions & 3 deletions cmd/andcli/tea.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ func (m *model) updateDetail(msg tea.Msg) (tea.Model, tea.Cmd) {
}
case tickMsg:
if copied {
if copiedVisibleSecs > 0 {
copiedVisibleSecs--
if copiedVisibleMSecs > 0 {
copiedVisibleMSecs--
} else {
copied = false
copiedVisibleSecs = 2
copiedVisibleMSecs = 2000
}
}

Expand Down

0 comments on commit ee3e8cb

Please sign in to comment.