mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-11 19:52:01 +00:00
open rss item in in-app safari
This commit is contained in:
parent
6dc437b226
commit
b246e01f02
2 changed files with 6 additions and 6 deletions
|
@ -20,8 +20,8 @@ public struct RSSTab: View {
|
|||
@Environment(\.managedObjectContext) private var moContext
|
||||
@State private var isLoading = true
|
||||
|
||||
@Environment(RouterPath.self) private var routerPath
|
||||
@State private var showAlert = false
|
||||
@State private var routerPath = RouterPath()
|
||||
|
||||
public init() {}
|
||||
|
||||
|
@ -31,15 +31,15 @@ public struct RSSTab: View {
|
|||
ProgressView()
|
||||
} else {
|
||||
List {
|
||||
ForEach(items) { i in
|
||||
ForEach(items) { item in
|
||||
Button(action: {
|
||||
if let url = i.url {
|
||||
if let url = item.url {
|
||||
_ = routerPath.handle(url: url)
|
||||
} else {
|
||||
showAlert = true
|
||||
}
|
||||
}, label: {
|
||||
RSSItemView(i)
|
||||
RSSItemView(item)
|
||||
})
|
||||
.buttonStyle(.plain)
|
||||
.alert("rss.item.url.unavailable", isPresented: $showAlert) {
|
||||
|
@ -61,8 +61,9 @@ public struct RSSTab: View {
|
|||
|
||||
let feedURLs = [
|
||||
"https://www.swift.org/atom.xml",
|
||||
"https://www.computerenhance.com/feed",
|
||||
"https://wadetregaskis.com/feed",
|
||||
"https://121clicks.com/feed",
|
||||
// "https://121clicks.com/feed",
|
||||
"https://iso.500px.com/feed/",
|
||||
]
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ enum Tab: Int, Identifiable, Hashable, CaseIterable, Codable {
|
|||
case .other:
|
||||
EmptyView()
|
||||
case .rss:
|
||||
// FIXME: open in web view
|
||||
RSSTab()
|
||||
.withSafariRouter()
|
||||
.environment(Self.routerPath)
|
||||
|
|
Loading…
Reference in a new issue