mirror of
https://github.com/joshuaclayton/unused.git
synced 2024-08-15 15:50:26 +03:00
Don't recalculate metadata on matches when organizing by directory
This commit is contained in:
parent
961585ce6e
commit
00c239fddb
@ -106,9 +106,11 @@ responseForPath :: DirectoryPrefix -> TermMatchSet -> TermMatchSet
|
||||
responseForPath s =
|
||||
filterVByPath . filterKVByPath
|
||||
where
|
||||
filterVByPath = Map.map (resultsFromMatches . filter (((==) s) . fileNameGrouping . tmPath) . trMatches)
|
||||
filterVByPath = Map.map (updateMatchesWith newMatches)
|
||||
filterKVByPath = Map.filterWithKey (\_ a -> s `elem` allPaths a)
|
||||
allPaths = fmap (fileNameGrouping . tmPath) . trMatches
|
||||
updateMatchesWith f tr = tr { trMatches = f tr }
|
||||
newMatches = (filter (((==) s) . fileNameGrouping . tmPath) . trMatches)
|
||||
|
||||
fileNameGrouping :: String -> DirectoryPrefix
|
||||
fileNameGrouping =
|
||||
|
Loading…
Reference in New Issue
Block a user