From e5eb6efad6f8e370bb6f49fc30d1ccd65ef6cbbf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 31 Aug 2020 10:30:47 +0100 Subject: [PATCH] mute icon names the other way around --- posts.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/posts.py b/posts.py index 322f7f11..1400e4a3 100644 --- a/posts.py +++ b/posts.py @@ -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 +