From 156c81c7efa71acd7e35d297929d3f4721764f26 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 22 Aug 2019 13:14:24 +0100 Subject: [PATCH] Refresh inbox if on the first page --- webinterface.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/webinterface.py b/webinterface.py index 0e3a4a8f9..eef036fa7 100644 --- a/webinterface.py +++ b/webinterface.py @@ -678,12 +678,17 @@ def htmlNewPost(baseDir: str,path: str,inReplyTo: str,mentions: []) -> str: newPostForm+=htmlFooter() return newPostForm -def htmlHeader(css=None,lang='en') -> str: +def htmlHeader(css=None,refreshSec=0,lang='en') -> str: + if refreshSec==0: + meta=' \n' + else: + meta=' \n' + if not css: htmlStr= \ '\n' \ - '\n' \ - ' \n' \ + '\n'+ \ + meta+ \ ' \n' \ ' \n' return htmlStr @@ -1365,8 +1370,11 @@ def htmlTimeline(pageNumber: int,itemsPerPage: int,session,baseDir: str, \ moderationButtonStr='' if moderator: moderationButtonStr='' - + tlStr=htmlHeader(profileStyle) + if boxName=='inbox' and pageNumber==1: + # refresh if on the first page of the inbox + tlStr=htmlHeader(profileStyle,240) # banner and row of buttons tlStr+= \