Check snooze status

main
Bob Mottram 2019-11-25 09:37:01 +00:00
parent 7ffc14e0fb
commit 168bcf84f9
1 changed files with 8 additions and 4 deletions

View File

@ -2593,17 +2593,21 @@ def htmlTimeline(recentPostsCache: {},maxRecentPosts: int,
tlStr+='<div class="galleryContainer">\n' tlStr+='<div class="galleryContainer">\n'
for item in timelineJson['orderedItems']: for item in timelineJson['orderedItems']:
if item['type']=='Create' or item['type']=='Announce': if item['type']=='Create' or item['type']=='Announce':
#avatarUrl=getPersonAvatarUrl(baseDir,item['actor'],personCache) # is the actor who sent this post snoozed?
if isPersonSnoozed(baseDir,nickname,domain,item['actor']):
continue
# is the post in the memory cache of recent ones?
currTlStr=None currTlStr=None
if boxName!='tlmedia' and recentPostsCache.get('index'): if boxName!='tlmedia' and recentPostsCache.get('index'):
postId=item['id'].replace('/activity','').replace('/','#') postId=item['id'].replace('/activity','').replace('/','#')
if postId in recentPostsCache['index']: if postId in recentPostsCache['index']:
if recentPostsCache['html'].get(postId): if recentPostsCache['html'].get(postId):
currTlStr=recentPostsCache['html'][postId] currTlStr=recentPostsCache['html'][postId]
currTlStr= \ currTlStr= \
preparePostFromHtmlCache(currTlStr,boxName,pageNumber) preparePostFromHtmlCache(currTlStr,boxName,pageNumber)
#print('Post obtained from recent cache ('+str(len(recentPostsCache['index']))+'): '+postId)
if not currTlStr: if not currTlStr:
# read the post from disk
currTlStr= \ currTlStr= \
individualPostAsHtml(recentPostsCache,maxRecentPosts, \ individualPostAsHtml(recentPostsCache,maxRecentPosts, \
iconsDir,translate,pageNumber, \ iconsDir,translate,pageNumber, \