mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Widget
• Hides count text when there are no articles beyond what is displayed. • Fixes html appearing in titles.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import RSWeb
|
||||
|
||||
struct ArticleItemView: View {
|
||||
|
||||
|
||||
@@ -60,10 +60,12 @@ struct StarredWidgetView : View {
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(L10n.starredCount(entry.widgetData.currentStarredCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
if entry.widgetData.currentStarredCount - maxCount() > 0 {
|
||||
Text(L10n.starredCount(entry.widgetData.currentStarredCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
|
||||
@@ -60,10 +60,12 @@ struct TodayWidgetView : View {
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(L10n.todayCount(entry.widgetData.currentTodayCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
if entry.widgetData.currentTodayCount - maxCount() > 0 {
|
||||
Text(L10n.todayCount(entry.widgetData.currentTodayCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
|
||||
@@ -60,10 +60,12 @@ struct UnreadWidgetView : View {
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(L10n.unreadCount(entry.widgetData.currentUnreadCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
if entry.widgetData.currentUnreadCount - maxCount() > 0 {
|
||||
Text(L10n.unreadCount(entry.widgetData.currentUnreadCount - maxCount()))
|
||||
.font(.caption2)
|
||||
.bold()
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
|
||||
Reference in New Issue
Block a user