aboutsummaryrefslogtreecommitdiff
path: root/client/src/Util
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/Util')
-rw-r--r--client/src/Util/WaitFor.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/Util/WaitFor.hs b/client/src/Util/WaitFor.hs
index 7d5e7c5..46882aa 100644
--- a/client/src/Util/WaitFor.hs
+++ b/client/src/Util/WaitFor.hs
@@ -9,10 +9,9 @@ import qualified Reflex.Dom as R
waitFor
:: forall t m a b. MonadWidget t m
=> (Event t a -> m (Event t b))
- -> Event t ()
- -> Dynamic t a
+ -> Event t a
-> m (Event t b, Event t Bool)
-waitFor op start input = do
- result <- op (R.tag (R.current input) start) >>= R.debounce (0.5 :: NominalDiffTime)
- let waiting = R.leftmost [ const True <$> start , const False <$> result ]
+waitFor op input = do
+ result <- op input >>= R.debounce (0.2 :: NominalDiffTime)
+ let waiting = R.leftmost [ const True <$> input , const False <$> result ]
return (result, waiting)