mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
Add comments about the un-sanitized URL.
This commit is contained in:
parent
29758d1aa7
commit
5f598a918c
2 changed files with 5 additions and 2 deletions
|
@ -18,7 +18,8 @@ import Foundation
|
|||
|
||||
@objc
|
||||
class URLPreviewViewData: NSObject {
|
||||
/// The URL that's represented by the preview data.
|
||||
/// The URL that's represented by the preview data. This may have been sanitized.
|
||||
/// Note: The original URL, is stored in ``URLPreviewViewModel``.
|
||||
let url: URL
|
||||
|
||||
/// The OpenGraph site name for the URL.
|
||||
|
|
|
@ -23,7 +23,8 @@ class URLPreviewViewModel: NSObject, URLPreviewViewModelType {
|
|||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
|
||||
/// The original (un-sanitized) URL to be previewed.
|
||||
private let url: URL
|
||||
private let session: MXSession
|
||||
|
||||
|
@ -76,6 +77,7 @@ class URLPreviewViewModel: NSObject, URLPreviewViewModelType {
|
|||
}
|
||||
|
||||
private func openURL() {
|
||||
// Open the original (un-sanitized) URL stored in the view model.
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue