From aa76455a3dfd4504697e1b3fdb33e0aeb01db4d7 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Mon, 25 Jan 2021 13:15:01 -0800 Subject: remove double posts --- CacheDatabase.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CacheDatabase.go b/CacheDatabase.go index 5b8a6d0..7b60bd6 100644 --- a/CacheDatabase.go +++ b/CacheDatabase.go @@ -232,14 +232,7 @@ func GetObjectFromCache(db *sql.DB, id string) Collection { var postCnt int var imgCnt int - post.Replies, postCnt, imgCnt = GetObjectRepliesCache(db, post) - - var localPost ObjectBase - localPost.Replies, postCnt, imgCnt = GetObjectRepliesDB(db, post) - - for _, e := range localPost.Replies.OrderedItems { - post.Replies.OrderedItems = append(post.Replies.OrderedItems, e) - } + post.Replies, postCnt, imgCnt = GetObjectRepliesDB(db, post) post.Replies.TotalItems, post.Replies.TotalImgs = GetObjectRepliesCacheCount(db, post) -- cgit v1.2.3