|
|
|
@ -15,9 +15,6 @@ val Context.bookmarkStorage: PlacesBookmarksStorage
|
|
|
|
|
* Removes [children] from [BookmarkNode.children] and returns the new modified [BookmarkNode].
|
|
|
|
|
*/
|
|
|
|
|
operator fun BookmarkNode.minus(children: Set<BookmarkNode>): BookmarkNode {
|
|
|
|
|
return this.copy(children = this.children?.filter { filtered ->
|
|
|
|
|
children.none {
|
|
|
|
|
it.guid == filtered.guid
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
val removedChildrenGuids = children.map { it.guid }.toSet()
|
|
|
|
|
return this.copy(children = this.children?.filterNot { removedChildrenGuids.contains(it.guid) })
|
|
|
|
|
}
|
|
|
|
|