Files
element-x-ios/ElementX/Sources/Services/Media/MediaSource.swift
T
Doug 02eb4b35e2 Add SwiftFormat to the project. (#129)
* Run swiftformat for whitespace.
* Run swiftformat with some rules.
2022-07-06 14:49:05 +01:00

29 lines
646 B
Swift

//
// MediaSource.swift
// ElementX
//
// Created by Stefan Ceriu on 06/04/2022.
// Copyright © 2022 Element. All rights reserved.
//
import Foundation
import MatrixRustSDK
struct MediaSource: Equatable {
let underlyingSource: MatrixRustSDK.MediaSource
init(source: MatrixRustSDK.MediaSource) {
underlyingSource = source
}
init(urlString: String) {
underlyingSource = MatrixRustSDK.mediaSourceFromUrl(url: urlString)
}
// MARK: - Equatable
static func == (lhs: MediaSource, rhs: MediaSource) -> Bool {
lhs.underlyingSource.url() == rhs.underlyingSource.url()
}
}