Update the feed icon if it wasn't available when the inspector was first shown
This commit is contained in:
parent
7c26921487
commit
f785e9f839
|
@ -30,7 +30,7 @@ struct FeedInspectorView : View {
|
|||
}) {
|
||||
TextField("Feed Name", text: $viewModel.name)
|
||||
Toggle(isOn: $viewModel.isArticleExtractorAlwaysOn) {
|
||||
Text("Reader View is always on")
|
||||
Text("Always Show Reader View")
|
||||
}
|
||||
}
|
||||
Section(header: Text("HOME PAGE")) {
|
||||
|
@ -54,6 +54,7 @@ struct FeedInspectorView : View {
|
|||
|
||||
init(feed: Feed) {
|
||||
self.feed = feed
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(feedIconDidBecomeAvailable(_:)), name: .FeedIconDidBecomeAvailable, object: nil)
|
||||
}
|
||||
|
||||
var image: UIImage {
|
||||
|
@ -97,7 +98,11 @@ struct FeedInspectorView : View {
|
|||
var feedLinkURL: String {
|
||||
return feed.url
|
||||
}
|
||||
|
||||
|
||||
@objc func feedIconDidBecomeAvailable(_ notification: Notification) {
|
||||
objectWillChange.send()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue