From b637a6c0e143cf47cc82574c4d7af093f7ab27cb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 11 Nov 2020 19:42:53 +0000 Subject: [PATCH] Only show timeline post separator if a post was found --- webapp_search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp_search.py b/webapp_search.py index 7b2a8b13..42d9cf2a 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -596,7 +596,7 @@ def htmlHashtagSearch(cssCache: {}, if nickname: showIndividualPostIcons = True allowDeletion = False - hashtagSearchForm += separatorStr + \ + postStr = \ individualPostAsHtml(True, recentPostsCache, maxRecentPosts, iconsDir, translate, None, @@ -612,6 +612,8 @@ def htmlHashtagSearch(cssCache: {}, showIndividualPostIcons, showIndividualPostIcons, False, False, False) + if postStr: + hashtagSearchForm += separatorStr + postStr index += 1 if endIndex < noOfLines - 1: @@ -943,7 +945,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str, continue showIndividualPostIcons = True allowDeletion = False - historySearchForm += separatorStr + \ + postStr = \ individualPostAsHtml(True, recentPostsCache, maxRecentPosts, iconsDir, translate, None, @@ -959,6 +961,8 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str, showIndividualPostIcons, showIndividualPostIcons, False, False, False) + if postStr: + historySearchForm += separatorStr + postStr index += 1 historySearchForm += htmlFooter()