Skip to content

Commit 27d9283

Browse files
remove
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
1 parent 3b0d108 commit 27d9283

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Sources/NextcloudKit/NextcloudKit+Capabilities.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,10 @@ actor CapabilitiesStore {
430430
func set(_ account: String, value: NKCapabilities.Capabilities) {
431431
store[account] = value
432432
}
433+
434+
func remove(_ account: String) {
435+
store.removeValue(forKey: account)
436+
}
433437
}
434438

435439
/// Singleton container and public API for accessing and caching capabilities.
@@ -500,4 +504,8 @@ final public class NKCapabilities: Sendable {
500504
}
501505
return await store.get(account) ?? Capabilities()
502506
}
507+
508+
public func removeCapabilities(for account: String) async {
509+
await store.remove(account)
510+
}
503511
}

0 commit comments

Comments
 (0)