Fixed indentation (w). Probably fixed redactions sometimes displaying viewing user's name in place of actor's name. Fixed room history never loading sometimes (but not missing chunks in the middle yet).
This commit is contained in:
@@ -2,31 +2,31 @@ import json
|
||||
import yaml
|
||||
|
||||
with open("moment.flatpak.base.yaml") as f:
|
||||
base = yaml.load(f, Loader=yaml.FullLoader)
|
||||
base = yaml.load(f, Loader=yaml.FullLoader)
|
||||
|
||||
with open("flatpak-pip.json") as f:
|
||||
modules = json.load(f)["modules"]
|
||||
modules = json.load(f)["modules"]
|
||||
|
||||
# set some modules in front as dependencies and dropping matrix-nio
|
||||
# which is declared separately
|
||||
front = []
|
||||
back = []
|
||||
for m in modules:
|
||||
n = m["name"]
|
||||
if n.startswith("python3-") and \
|
||||
n[len("python3-"):] in ["cffi", "importlib-metadata", "multidict", "pytest-runner", "setuptools-scm"]:
|
||||
front.append(m)
|
||||
else:
|
||||
back.append(m)
|
||||
n = m["name"]
|
||||
if n.startswith("python3-") and \
|
||||
n[len("python3-"):] in ["cffi", "importlib-metadata", "multidict", "pytest-runner", "setuptools-scm"]:
|
||||
front.append(m)
|
||||
else:
|
||||
back.append(m)
|
||||
|
||||
# replace placeholder with modules
|
||||
phold = None
|
||||
for i in range(len(base["modules"])):
|
||||
if base["modules"][i]["name"] == "PLACEHOLDER PYTHON DEPENDENCIES":
|
||||
phold = i
|
||||
break
|
||||
if base["modules"][i]["name"] == "PLACEHOLDER PYTHON DEPENDENCIES":
|
||||
phold = i
|
||||
break
|
||||
|
||||
base["modules"] = base["modules"][:i] + front + back + base["modules"][i+1:]
|
||||
|
||||
with open("moment.flatpak.yaml", "w") as f:
|
||||
f.write(yaml.dump(base, sort_keys=False, indent=2))
|
||||
f.write(yaml.dump(base, sort_keys=False, indent=2))
|
||||
|
Reference in New Issue
Block a user