Only show the replies button if replies exist.

This simplifies the first time user experience a little
main
Bob Mottram 2020-11-29 09:49:48 +00:00
parent 291f24f6d6
commit 4df52f6c13
1 changed files with 10 additions and 5 deletions

View File

@ -7,6 +7,7 @@ __email__ = "bob@freedombone.net"
__status__ = "Production"
import os
import time
from datetime import datetime
from happening import todaysEventsCheck
@ -87,11 +88,15 @@ def headerButtonsTimeline(defaultTimeline: str,
'"><span>' + htmlHighlightLabel(translate['DM'], newDM) + \
'</span></button></a>'
tlStr += \
'<a href="' + usersPath + '/tlreplies"><button class="' + \
repliesButton + '"><span>' + \
htmlHighlightLabel(translate['Replies'], newReply) + \
'</span></button></a>'
repliesIndexFilename = \
baseDir + '/accounts/' + \
nickname + '@' + domain + '/tlreplies.index'
if os.path.isfile(repliesIndexFilename):
tlStr += \
'<a href="' + usersPath + '/tlreplies"><button class="' + \
repliesButton + '"><span>' + \
htmlHighlightLabel(translate['Replies'], newReply) + \
'</span></button></a>'
# typically the media button
if defaultTimeline != 'tlmedia':