mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
ui: support/require fsnotify 0.3.0.1+
The api has changed, it supports directory events, and might be more robust.
This commit is contained in:
parent
bcbf0489c7
commit
236101e31a
@ -212,7 +212,7 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do
|
||||
d
|
||||
-- predicate: ignore changes not involving our files
|
||||
(\fev -> case fev of
|
||||
Modified f _ -> f `elem` files
|
||||
Modified f _ False -> f `elem` files
|
||||
-- Added f _ -> f `elem` files
|
||||
-- Removed f _ -> f `elem` files
|
||||
-- we don't handle adding/removing journal files right now
|
||||
@ -223,7 +223,7 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do
|
||||
-- action: send event to app
|
||||
(\fev -> do
|
||||
-- return $ dbglog "fsnotify" $ showFSNEvent fev -- not working
|
||||
dbg1IO "fsnotify" $ showFSNEvent fev
|
||||
dbg1IO "fsnotify" $ show fev
|
||||
writeChan eventChan FileChange
|
||||
)
|
||||
|
||||
@ -234,7 +234,3 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do
|
||||
let myVty = mkVty def
|
||||
#endif
|
||||
void $ customMain myVty (Just eventChan) brickapp ui
|
||||
|
||||
showFSNEvent (Added f _) = "Added " ++ show f
|
||||
showFSNEvent (Modified f _) = "Modified " ++ show f
|
||||
showFSNEvent (Removed f _) = "Removed " ++ show f
|
||||
|
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: 76f2079643447fd282a8fb455594f8801e1a011cae69d7d1ec6bc3180dcf583f
|
||||
-- hash: 82e8763ca935ff359245f2b359e094fe863143d27e58a2d90b0ddb1e3d7c272e
|
||||
|
||||
name: hledger-ui
|
||||
version: 1.9.99
|
||||
@ -75,7 +75,7 @@ executable hledger-ui
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, fsnotify >=0.2
|
||||
, fsnotify >=0.3.0.1
|
||||
, hledger >=1.9.99 && <2.0
|
||||
, hledger-lib >=1.9.99 && <2.0
|
||||
, megaparsec >=6.4.1
|
||||
|
@ -51,7 +51,7 @@ dependencies:
|
||||
- data-default
|
||||
- directory
|
||||
- filepath
|
||||
- fsnotify >=0.2
|
||||
- fsnotify >=0.3.0.1
|
||||
- HUnit
|
||||
- microlens >=0.4
|
||||
- microlens-platform >=0.2.3.1
|
||||
|
@ -85,3 +85,8 @@ extra-deps:
|
||||
# - th-orphans-0.13.4
|
||||
# - vty-5.17.1
|
||||
# - word-wrap-0.4.1
|
||||
|
||||
# hledger-ui
|
||||
# newer fsnotify has a different api and may be more robust
|
||||
- fsnotify-0.3.0.1
|
||||
- shelly-1.7.2
|
||||
|
@ -46,3 +46,6 @@ extra-deps:
|
||||
- hashtables-1.2.3.1
|
||||
# avoid hanging with windows symlinks https://github.com/simonmichael/hledger/issues/791
|
||||
- directory-1.3.2.2
|
||||
# hledger-ui
|
||||
# newer fsnotify has a different api and may be more robust
|
||||
- fsnotify-0.3.0.1
|
||||
|
@ -21,6 +21,9 @@ extra-deps:
|
||||
- hashtables-1.2.3.1
|
||||
# avoid https://github.com/simonmichael/hledger/issues/791
|
||||
- directory-1.3.2.2
|
||||
# hledger-ui
|
||||
# newer fsnotify has a different api and may be more robust
|
||||
- fsnotify-0.3.0.1
|
||||
|
||||
nix:
|
||||
pure: false
|
||||
|
@ -13,7 +13,8 @@ extra-deps:
|
||||
# hledger-lib
|
||||
- easytest-0.1.1
|
||||
# hledger-ui
|
||||
- fsnotify-0.2.1.2
|
||||
# newer fsnotify has a different api and may be more robust
|
||||
- fsnotify-0.3.0.1
|
||||
# hledger-web
|
||||
- json-0.9.2
|
||||
- wai-handler-launch-3.0.2.4
|
||||
|
Loading…
Reference in New Issue
Block a user