mirror of https://gitlab.com/bashrc2/epicyon
Revert "Key access to individual timeline posts"
This reverts commit a8063e1c0d
.
merge-requests/30/head
parent
af2baff093
commit
e91cc35fd9
2
inbox.py
2
inbox.py
|
@ -178,7 +178,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
httpPrefix, __version__, boxname, None,
|
httpPrefix, __version__, boxname, None,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
not isDM(postJsonObject),
|
not isDM(postJsonObject),
|
||||||
True, True, False, True)
|
True, True, False, True)
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
deletePostStr += '<center>'
|
deletePostStr += '<center>'
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
|
|
|
@ -72,7 +72,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, False, False, True, False)
|
False, False, False, True, False)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
|
|
|
@ -119,7 +119,7 @@ def prepareHtmlPostNickname(nickname: str, postHtml: str) -> str:
|
||||||
|
|
||||||
|
|
||||||
def preparePostFromHtmlCache(nickname: str, postHtml: str, boxName: str,
|
def preparePostFromHtmlCache(nickname: str, postHtml: str, boxName: str,
|
||||||
pageNumber: int, accessKeyIndex: int) -> str:
|
pageNumber: int) -> str:
|
||||||
"""Sets the page number on a cached html post
|
"""Sets the page number on a cached html post
|
||||||
"""
|
"""
|
||||||
# if on the bookmarks timeline then remain there
|
# if on the bookmarks timeline then remain there
|
||||||
|
@ -134,19 +134,6 @@ def preparePostFromHtmlCache(nickname: str, postHtml: str, boxName: str,
|
||||||
withPageNumber = postHtml.replace(';-999;', ';' + str(pageNumber) + ';')
|
withPageNumber = postHtml.replace(';-999;', ';' + str(pageNumber) + ';')
|
||||||
withPageNumber = withPageNumber.replace('?page=-999',
|
withPageNumber = withPageNumber.replace('?page=-999',
|
||||||
'?page=' + str(pageNumber))
|
'?page=' + str(pageNumber))
|
||||||
# replace the key shortcut
|
|
||||||
for keyIndex in range(10):
|
|
||||||
keyStr = 'accesskey="' + str(keyIndex) + '"'
|
|
||||||
if keyStr in withPageNumber:
|
|
||||||
if accessKeyIndex == 0 or accessKeyIndex > 9:
|
|
||||||
withPageNumber = \
|
|
||||||
withPageNumber.replace(keyStr, '')
|
|
||||||
else:
|
|
||||||
withPageNumber = \
|
|
||||||
withPageNumber.replace(keyStr,
|
|
||||||
'accesskey="' +
|
|
||||||
str(accessKeyIndex) + '"')
|
|
||||||
break
|
|
||||||
return prepareHtmlPostNickname(nickname, withPageNumber)
|
return prepareHtmlPostNickname(nickname, withPageNumber)
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,8 +179,7 @@ def _getPostFromRecentCache(session,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
pageNumber: int,
|
pageNumber: int,
|
||||||
recentPostsCache: {},
|
recentPostsCache: {},
|
||||||
maxRecentPosts: int,
|
maxRecentPosts: int) -> str:
|
||||||
accessKeyIndex: int) -> str:
|
|
||||||
"""Attempts to get the html post from the recent posts cache in memory
|
"""Attempts to get the html post from the recent posts cache in memory
|
||||||
"""
|
"""
|
||||||
if boxName == 'tlmedia':
|
if boxName == 'tlmedia':
|
||||||
|
@ -231,8 +217,7 @@ def _getPostFromRecentCache(session,
|
||||||
return None
|
return None
|
||||||
|
|
||||||
postHtml = \
|
postHtml = \
|
||||||
preparePostFromHtmlCache(nickname, postHtml, boxName,
|
preparePostFromHtmlCache(nickname, postHtml, boxName, pageNumber)
|
||||||
pageNumber, accessKeyIndex)
|
|
||||||
updateRecentPostsCache(recentPostsCache, maxRecentPosts,
|
updateRecentPostsCache(recentPostsCache, maxRecentPosts,
|
||||||
postJsonObject, postHtml)
|
postJsonObject, postHtml)
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '3')
|
_logPostTiming(enableTimingLog, postStartTime, '3')
|
||||||
|
@ -1155,7 +1140,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, accessKeyIndex: int,
|
themeName: str,
|
||||||
showRepeats=True,
|
showRepeats=True,
|
||||||
showIcons=False,
|
showIcons=False,
|
||||||
manuallyApprovesFollowers=False,
|
manuallyApprovesFollowers=False,
|
||||||
|
@ -1214,8 +1199,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
recentPostsCache,
|
recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts)
|
||||||
accessKeyIndex)
|
|
||||||
if postHtml:
|
if postHtml:
|
||||||
return postHtml
|
return postHtml
|
||||||
|
|
||||||
|
@ -1668,13 +1652,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
|
|
||||||
postHtml = ''
|
postHtml = ''
|
||||||
if boxName != 'tlmedia':
|
if boxName != 'tlmedia':
|
||||||
if accessKeyIndex > 0 and accessKeyIndex <= 9:
|
postHtml = ' <div id="' + timelinePostBookmark + \
|
||||||
postHtml = ' <div id="' + timelinePostBookmark + \
|
'" class="' + containerClass + '">\n'
|
||||||
'" class="' + containerClass + \
|
|
||||||
'" accesskey="' + str(accessKeyIndex) + '">\n'
|
|
||||||
else:
|
|
||||||
postHtml = ' <div id="' + timelinePostBookmark + \
|
|
||||||
'" class="' + containerClass + '">\n'
|
|
||||||
postHtml += avatarImageInPost
|
postHtml += avatarImageInPost
|
||||||
postHtml += ' <div class="post-title">\n' + \
|
postHtml += ' <div class="post-title">\n' + \
|
||||||
' ' + titleStr + \
|
' ' + titleStr + \
|
||||||
|
@ -1753,7 +1732,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess, themeName, 0,
|
allowLocalNetworkAccess, themeName,
|
||||||
False, authorized, False, False, False)
|
False, authorized, False, False, False)
|
||||||
messageId = removeIdEnding(postJsonObject['id'])
|
messageId = removeIdEnding(postJsonObject['id'])
|
||||||
|
|
||||||
|
@ -1781,7 +1760,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False) + postStr
|
False, False, False) + postStr
|
||||||
|
|
||||||
|
@ -1812,7 +1791,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False)
|
False, False, False)
|
||||||
cssFilename = baseDir + '/epicyon-profile.css'
|
cssFilename = baseDir + '/epicyon-profile.css'
|
||||||
|
@ -1854,7 +1833,7 @@ def htmlPostReplies(cssCache: {},
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
|
|
||||||
cssFilename = baseDir + '/epicyon-profile.css'
|
cssFilename = baseDir + '/epicyon-profile.css'
|
||||||
|
|
|
@ -309,7 +309,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
i += 1
|
i += 1
|
||||||
if i >= 20:
|
if i >= 20:
|
||||||
|
@ -916,7 +916,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
False, False, False, True, False)
|
False, False, False, True, False)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
|
|
|
@ -609,7 +609,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
False, False, False)
|
False, False, False)
|
||||||
|
@ -782,7 +782,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, 0,
|
themeName,
|
||||||
showRepeats, showIcons,
|
showRepeats, showIcons,
|
||||||
manuallyApprovesFollowers,
|
manuallyApprovesFollowers,
|
||||||
showPublicOnly,
|
showPublicOnly,
|
||||||
|
|
|
@ -697,8 +697,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
preparePostFromHtmlCache(nickname,
|
preparePostFromHtmlCache(nickname,
|
||||||
currTlStr,
|
currTlStr,
|
||||||
boxName,
|
boxName,
|
||||||
pageNumber,
|
pageNumber)
|
||||||
itemCtr)
|
|
||||||
_logTimelineTiming(enableTimingLog,
|
_logTimelineTiming(enableTimingLog,
|
||||||
timelineStartTime,
|
timelineStartTime,
|
||||||
boxName, '10')
|
boxName, '10')
|
||||||
|
@ -727,7 +726,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
theme, itemCtr + 1,
|
theme,
|
||||||
boxName != 'dm',
|
boxName != 'dm',
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
|
|
Loading…
Reference in New Issue