mute icon names the other way around

main
Bob Mottram 2020-08-31 10:30:47 +01:00
parent f59d411c9e
commit e5eb6efad6
1 changed files with 5 additions and 5 deletions

View File

@ -3540,8 +3540,8 @@ def mutePost(baseDir: str, nickname: str, domain: str, postId: str,
if cachedPostFilename:
with open(cachedPostFilename, 'r') as cacheFile:
postHtml = cacheFile.read()
if '/unmute.png' in postHtml:
postHtml = postHtml.replace('/unmute.png', '/mute.png')
if '/mute.png' in postHtml:
postHtml = postHtml.replace('/mute.png', '/unmute.png')
postHtml = postHtml.replace('?mute=', '?unmute=')
newCacheFile = open(cachedPostFilename, 'w+')
if newCacheFile:
@ -3575,7 +3575,7 @@ def mutePost(baseDir: str, nickname: str, domain: str, postId: str,
postHtml = recentPostsCache['html'][postId]
if '/unmute.png' in postHtml:
postHtml = \
postHtml.replace('/unmute.png', '/mute.png')
postHtml.replace('/mute.png', '/unmute.png')
recentPostsCache['html'][postId] = \
postHtml.replace('?mute=', '?unmute=')
print('MUTE: ' + postId +
@ -3605,7 +3605,7 @@ def unmutePost(baseDir: str, nickname: str, domain: str, postId: str,
with open(cachedPostFilename, 'r') as cacheFile:
postHtml = cacheFile.read()
if '/mute.png' in postHtml:
postHtml = postHtml.replace('/mute.png', '/unmute.png')
postHtml = postHtml.replace('/unmute.png', '/mute.png')
postHtml = postHtml.replace('?unmute=', '?mute=')
newCacheFile = open(cachedPostFilename, 'w+')
if newCacheFile:
@ -3631,7 +3631,7 @@ def unmutePost(baseDir: str, nickname: str, domain: str, postId: str,
postHtml = recentPostsCache['html'][postId]
if '/mute.png' in postHtml:
postHtml = \
postHtml.replace('/mute.png', '/unmute.png')
postHtml.replace('/unmute.png', '/mute.png')
recentPostsCache['html'][postId] = \
postHtml.replace('?unmute=', '?mute=')
print('UNMUTE: ' + postId +