Louis Hollingworth
9345b91573
Added beginnings of feed parsing, may need to switch parser. Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
27 lines
1.1 KiB
Swift
27 lines
1.1 KiB
Swift
//
|
|
// FeedView.swift
|
|
// Leganto
|
|
//
|
|
// Created by Louis Hollingworth on 2023-05-23.
|
|
//
|
|
|
|
import SwiftUI
|
|
import FeedKit
|
|
|
|
struct FeedView: View {
|
|
var feed: Feed
|
|
@ObservedObject var parsed: LFeedParser = LFeedParser(urlStr: "https://git.ludoviko.ch/lucxjo/leganto-apple.rss")
|
|
|
|
var body: some View {
|
|
List {
|
|
if let feed = parsed.jsonFeed {
|
|
ForEach(feed.items!, id: \.id!) { item in
|
|
FeedViewCell(title: item.title!, author: item.author!, date: Date(),
|
|
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
|
|
}
|
|
}
|
|
}
|
|
.navigationTitle(feed.name!)
|
|
}
|
|
}
|