mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Pin/Unpin Logic (#3084)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Combine
|
||||
import Foundation
|
||||
|
||||
public extension Task where Success == Never, Failure == Never {
|
||||
@@ -61,3 +62,13 @@ public extension Task where Success == Never, Failure == Never {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Task {
|
||||
func store(in cancellables: inout Set<AnyCancellable>) {
|
||||
asCancellable().store(in: &cancellables)
|
||||
}
|
||||
|
||||
func asCancellable() -> AnyCancellable {
|
||||
AnyCancellable(cancel)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user