mirror of https://gitlab.com/bashrc2/epicyon
Set muted status before saving
parent
450a9faf57
commit
43e85cc39c
|
@ -512,6 +512,7 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
igIt = len(itemsList)
|
igIt = len(itemsList)
|
||||||
itemsList.append(newIgnore)
|
itemsList.append(newIgnore)
|
||||||
postJsonObj['ignores']['totalItems'] = igIt
|
postJsonObj['ignores']['totalItems'] = igIt
|
||||||
|
postJsonObject['muted'] = True
|
||||||
saveJson(postJsonObject, postFilename)
|
saveJson(postJsonObject, postFilename)
|
||||||
|
|
||||||
# remove cached post so that the muted version gets recreated
|
# remove cached post so that the muted version gets recreated
|
||||||
|
@ -594,6 +595,7 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
else:
|
else:
|
||||||
igItLen = len(postJsonObj['ignores']['items'])
|
igItLen = len(postJsonObj['ignores']['items'])
|
||||||
postJsonObj['ignores']['totalItems'] = igItLen
|
postJsonObj['ignores']['totalItems'] = igItLen
|
||||||
|
postJsonObject['muted'] = False
|
||||||
saveJson(postJsonObject, postFilename)
|
saveJson(postJsonObject, postFilename)
|
||||||
|
|
||||||
# remove cached post so that the muted version gets recreated
|
# remove cached post so that the muted version gets recreated
|
||||||
|
|
Loading…
Reference in New Issue