mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Set iconURL from response if possible
This commit is contained in:
parent
557ca6adaa
commit
3575008e28
1 changed files with 10 additions and 0 deletions
|
|
@ -192,6 +192,16 @@ public class ShareExtensionViewModel: ObservableObject {
|
|||
if let title = self.linkedItem?.title {
|
||||
self.title = title
|
||||
}
|
||||
if let iconURL = self.linkedItem?.imageURL {
|
||||
self.iconURL = iconURL
|
||||
}
|
||||
if let noteHighlight = self.linkedItem?.highlights?
|
||||
.compactMap({ $0 as? Highlight })
|
||||
.first(where: { $0.type == "NOTE" }),
|
||||
let noteText = noteHighlight.annotation
|
||||
{
|
||||
self.noteText = noteText
|
||||
}
|
||||
if let urlStr = self.linkedItem?.pageURLString, let hostname = URL(string: urlStr)?.host {
|
||||
self.url = hostname
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue