Skip to content

Commit

Permalink
Typos; Display attachments without content.
Browse files Browse the repository at this point in the history
  • Loading branch information
levitatingpineapple committed Feb 12, 2024
1 parent d44f36b commit ebfbeb3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
Binary file added .readme/excellent_employee.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion App/Fetch/FeedFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ actor FeedFetcher {
/// Returns a publisher that emits download status for a given feed.
///
/// - Parameter source: Source URL of the feed
/// - Returns: Dwnload state publisher
/// - Returns: Download's state publisher
func isLoading(source: URL) -> CurrentValueSubject<Bool, Never> {
if let publisher = loadingSubjects[source] {
return publisher
Expand Down
2 changes: 1 addition & 1 deletion App/Views/Attachment/AttachmentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct AttachmentView: View {
VStack(spacing: .zero) {
mediaPreview
HStack(alignment: .bottom) {
Text(attachment.title ?? attachment.url.lastPathComponent)
Text(attachment.title ?? attachment.localUrl.lastPathComponent)
.frame(minHeight: 24)
Spacer()
progressButton
Expand Down
8 changes: 3 additions & 5 deletions App/Views/Item/ItemDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ struct ItemDetailView: View {
VStack(spacing: .zero) {
switch display {
case .content:
if let content = item.content {
contentView(content)
}
contentView(item.content ?? String())
case .extractedContent:
if let extracted = item.extracted {
contentView(extracted)
Expand Down Expand Up @@ -90,8 +88,8 @@ struct SystemImageButton: View {
}
}

/// ``ItemDetailView`` wrapper that handles emtpy state
struct ItemDeatilWrapperView: View {
/// ``ItemDetailView`` wrapper that handles empty state
struct ItemDetailWrapperView: View {
@Query<Item.RequestSingle> var item: Item?

init(id: Item.ID) {
Expand Down
2 changes: 0 additions & 2 deletions App/Views/Representables/ContentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ struct ContentViewController: UIViewControllerRepresentable {
_ viewController: ViewController,
context: Context
) {
viewController.url = item.url
viewController.attachmentsController.rootView = AttachmentsView(
item: item,
scale: scale
Expand Down Expand Up @@ -50,7 +49,6 @@ struct ContentViewController: UIViewControllerRepresentable {
extension ContentViewController {
class ViewController: UIViewController {
let attachmentsController = UIHostingController<AttachmentsView?>(rootView: .none)
var url: URL?
private var observation: NSKeyValueObservation?

var webView: WKWebView { view as! WKWebView }
Expand Down
2 changes: 1 addition & 1 deletion App/Views/Shared/NavigationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct NavigationView: View {
}
} detail: {
if let id = navigation.itemId {
ItemDeatilWrapperView(id: id)
ItemDetailWrapperView(id: id)
}
}
.task {
Expand Down

0 comments on commit ebfbeb3

Please sign in to comment.