Only use index for bookmarks timeline

main
Bob Mottram 2019-11-17 14:36:32 +00:00
parent ecb0b3b419
commit 3bb0ef5b27
1 changed files with 11 additions and 10 deletions

View File

@ -2117,9 +2117,9 @@ def createBoxBase(session,baseDir: str,boxname: str, \
indexFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+indexBoxName+'.index' indexFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+indexBoxName+'.index'
lookedUpFromIndex=False lookedUpFromIndex=False
postsCtr=0
if os.path.isfile(indexFilename): if os.path.isfile(indexFilename):
print('DEBUG: using index file to construct timeline') print('DEBUG: using index file to construct timeline')
postsCtr=0
maxPostCtr=None maxPostCtr=None
if not pageNumber: if not pageNumber:
minPageNumber=4 minPageNumber=4
@ -2135,17 +2135,18 @@ def createBoxBase(session,baseDir: str,boxname: str, \
postsCtr+=1 postsCtr+=1
lookedUpFromIndex=True lookedUpFromIndex=True
else: else:
postsCtr=createBoxIndex(boxDir,postsInBoxDict) if boxname!='tlbookmarks':
postsCtr=createBoxIndex(boxDir,postsInBoxDict)
# combine the inbox for the account with the shared inbox # combine the inbox for the account with the shared inbox
if sharedBoxDir and boxname!='tlbookmarks': if sharedBoxDir:
postsCtr= \ postsCtr= \
createSharedInboxIndex(baseDir,sharedBoxDir, \ createSharedInboxIndex(baseDir,sharedBoxDir, \
postsInBoxDict,postsCtr, \ postsInBoxDict,postsCtr, \
nickname,domain,ocapAlways) nickname,domain,ocapAlways)
# sort the list in descending order of date # sort the list in descending order of date
postsInBox=OrderedDict(sorted(postsInBoxDict.items(),reverse=True)) postsInBox=OrderedDict(sorted(postsInBoxDict.items(),reverse=True))
# number of posts in box # number of posts in box
boxHeader['totalItems']=postsCtr boxHeader['totalItems']=postsCtr