Skip to content

Commit

Permalink
Fix RSS Section Header
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-128 committed Nov 12, 2024
1 parent 7cfcc58 commit 4a37f96
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions qBitControl/Views/RSSViews/RSSNodeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ struct RSSNodeView: View {
}

func sectionHeader() -> Text {
Text(
"\(!rssNode.nodes.isEmpty ? "\(rssNode.nodes.count) Folders" : "")" +
"\(!rssNode.feeds.isEmpty ? "\(rssNode.feeds.count) Feeds" : "")"
)
var header: [String] = []
if(!rssNode.nodes.isEmpty) { header.append("\(rssNode.nodes.count) Folders") }
if(!rssNode.feeds.isEmpty) { header.append("\(rssNode.feeds.count) Feeds") }

return Text(header.joined(separator: ""))
}

func toolbar() -> some ToolbarContent {
Expand Down

0 comments on commit 4a37f96

Please sign in to comment.