Fixed "mark all as read"

This commit is contained in:
Asaf Gartner 2022-02-07 15:11:26 +02:00
parent c8f401f738
commit 50332c6800
1 changed files with 6 additions and 2 deletions

View File

@ -155,7 +155,9 @@ func FetchThreads(
row := *iresult.(*resultRow)
hasRead := false
if row.ThreadLastReadTime != nil && row.ThreadLastReadTime.After(row.LastPost.PostDate) {
if currentUser != nil && currentUser.MarkedAllReadAt.After(row.LastPost.PostDate) {
hasRead = true
} else if row.ThreadLastReadTime != nil && row.ThreadLastReadTime.After(row.LastPost.PostDate) {
hasRead = true
} else if row.ForumLastReadTime != nil && row.ForumLastReadTime.After(row.LastPost.PostDate) {
hasRead = true
@ -413,7 +415,9 @@ func FetchPosts(
row := *iresult.(*resultRow)
hasRead := false
if row.ThreadLastReadTime != nil && row.ThreadLastReadTime.After(row.Post.PostDate) {
if currentUser != nil && currentUser.MarkedAllReadAt.After(row.Post.PostDate) {
hasRead = true
} else if row.ThreadLastReadTime != nil && row.ThreadLastReadTime.After(row.Post.PostDate) {
hasRead = true
} else if row.ForumLastReadTime != nil && row.ForumLastReadTime.After(row.Post.PostDate) {
hasRead = true