Skip to content

Commit

Permalink
Show progress bar in entry details view again
Browse files Browse the repository at this point in the history
So that "Copying..." isn't stuck as the footer (until it's cleared)
  • Loading branch information
akazukin5151 committed Sep 5, 2021
1 parent 78f103f commit 53b6023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kpxhs/ViewEvents/Copy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Types
, CopyType (CopyUsername)
, Event (ClearClipCount, Copying)
, State
, View (BrowserView, SearchView)
, View (BrowserView, EntryDetailsView, SearchView)
, activeView
, chan
, clearTimeout
Expand Down Expand Up @@ -94,7 +94,7 @@ handleClipCountInner st count timeout' = do
-- I think Int -> Float is fine because Float is larger than Int
-- so an int shouldn't be truncated
v = fromIntegral count / fromIntegral timeout'
f = if st^.activeView == BrowserView || st^.activeView == SearchView
f = if st^.activeView `elem` [BrowserView, SearchView, EntryDetailsView]
then footer .~ P.progressBar label v
else id

Expand Down

0 comments on commit 53b6023

Please sign in to comment.