mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 07:13:24 +03:00
Rename
This commit is contained in:
parent
774e74d726
commit
3417d806b5
@ -105,7 +105,7 @@ class FileItemService: StandardFlow {
|
||||
|
||||
// TODO Remove cached items more aggressively?
|
||||
let hasRelations = self.monitors.keys.reduce(false) { (result, monitoredUrl) in
|
||||
return result ? result : monitoredUrl.parent(ofUrl: url) || url.parent(ofUrl: monitoredUrl)
|
||||
return result ? result : monitoredUrl.isParent(of: url) || url.isParent(of: monitoredUrl)
|
||||
}
|
||||
|
||||
if hasRelations {
|
||||
|
@ -62,7 +62,7 @@ extension FileOutlineView {
|
||||
self.fileItems.remove(fileItem)
|
||||
if fileItem.dir {
|
||||
self.fileItems
|
||||
.filter { fileItem.url.parent(ofUrl: $0.url) }
|
||||
.filter { fileItem.url.isParent(of: $0.url) }
|
||||
.forEach { self.fileItems.remove($0) }
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import Foundation
|
||||
|
||||
extension URL {
|
||||
|
||||
func parent(ofUrl url: URL) -> Bool {
|
||||
func isParent(of url: URL) -> Bool {
|
||||
guard self.isFileURL && url.isFileURL else {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user