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