File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -376,17 +376,21 @@ public class RustPlaces: @unchecked Sendable, BookmarksHandler {
376
376
}
377
377
378
378
public func deleteBookmarksWithURL( url: String ) -> Success {
379
- return getBookmarksWithURL ( url: url) >>== { bookmarks in
380
- let deferreds = bookmarks. map ( { self . deleteBookmarkNode ( guid: $0. guid) } )
381
- return all ( deferreds) . bind { results in
382
- if let error = results. first ( where: { $0. isFailure } ) ? . failureValue {
383
- return deferMaybe ( error)
379
+ return getBookmarksWithURL ( url: url)
380
+ . bind { res in
381
+ guard case . success( let bookmarks) = res else {
382
+ return Deferred ( value: Maybe ( failure: res. failureValue!) )
383
+ }
384
+ let deferreds = bookmarks. map ( { self . deleteBookmarkNode ( guid: $0. guid) } )
385
+ return all ( deferreds) . bind { results in
386
+ if let error = results. first ( where: { $0. isFailure } ) ? . failureValue {
387
+ return deferMaybe ( error)
388
+ }
389
+
390
+ self . notificationCenter. post ( name: . BookmarksUpdated, withObject: self )
391
+ return succeed ( )
384
392
}
385
-
386
- self . notificationCenter. post ( name: . BookmarksUpdated, withObject: self )
387
- return succeed ( )
388
393
}
389
- }
390
394
}
391
395
392
396
public func createFolder( parentGUID: GUID , title: String ,
You can’t perform that action at this time.
0 commit comments