• Hides count text when there are no articles beyond what is displayed.
• Fixes html appearing in titles.
This commit is contained in:
Stuart Breckenridge
2021-01-30 09:02:42 +08:00
parent 4414ea6c06
commit 474fbedbc3
7 changed files with 49 additions and 19 deletions

View File

@@ -7,6 +7,7 @@
//
import SwiftUI
import RSWeb
struct ArticleItemView: View {

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)