Skip to content

Commit d7580c3

Browse files
authored
Merge pull request #38 from SubvertDev/feature/fix-forum-type-in-favorites
Fix forum type in favorites
2 parents 3f73dc9 + da79350 commit d7580c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Modules/Sources/FavoritesFeature/FavoritesScreen.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,10 @@ public struct FavoritesScreen: View {
196196
lastPost: favorite.topic.lastPost,
197197
closed: favorite.topic.isClosed,
198198
unread: favorite.topic.isUnread,
199+
forum: favorite.isForum,
199200
notify: favorite.notify
200201
) { showUnread in
201-
if showUnread {
202+
if showUnread && !favorite.isForum {
202203
store.send(.unreadTapped(id: favorite.topic.id))
203204
} else {
204205
store.send(
@@ -262,6 +263,7 @@ public struct FavoritesScreen: View {
262263
lastPost: TopicInfo.LastPost? = nil,
263264
closed: Bool = false,
264265
unread: Bool = false,
266+
forum: Bool = false,
265267
notify: FavoriteInfo.Notify,
266268
action: @escaping (_ unreadTapped: Bool) -> Void
267269
) -> some View {
@@ -271,7 +273,7 @@ public struct FavoritesScreen: View {
271273
} label: {
272274
HStack(spacing: 10) {
273275
VStack(alignment: .leading, spacing: 6) {
274-
if let lastPost {
276+
if let lastPost, !forum {
275277
Text(lastPost.formattedDate, bundle: .models)
276278
.font(.caption)
277279
.foregroundStyle(Color(.Labels.teritary))
@@ -284,7 +286,7 @@ public struct FavoritesScreen: View {
284286
foregroundStyle: Color(.Labels.primary)
285287
)
286288

287-
if let lastPost {
289+
if let lastPost, !forum {
288290
HStack(spacing: 4) {
289291
Image(systemSymbol: .personCircle)
290292
.font(.caption)

0 commit comments

Comments
 (0)