Add settings to hide membership and profile events
This commit is contained in:
parent
f13327b073
commit
c6390238a9
4
TODO.md
4
TODO.md
|
@ -5,6 +5,8 @@
|
|||
- Redacting messages
|
||||
- Download progress bar for file events, "Save as..."
|
||||
- Make rooms fully manageable within Mirage: settings, permissions, kick, etc
|
||||
|
||||
- See about FlatPak packaging
|
||||
- Add AppImage metadata file
|
||||
- Pillow now bundle image libraries?
|
||||
Update AppImage building script and INSTALL.md
|
||||
|
@ -29,6 +31,8 @@
|
|||
- Drop the `HBox` `buttonModel`/`buttonCallbacks` `HBox` approach,
|
||||
be more declarative
|
||||
|
||||
- Look into Kirigami for QML
|
||||
|
||||
## Issues
|
||||
|
||||
- When zooming in enough, "Mirage <version>" label overflows
|
||||
|
|
|
@ -213,6 +213,10 @@ class NioCallbacks:
|
|||
|
||||
# Membership changes
|
||||
if not prev or membership != prev_membership:
|
||||
if self.client.backend.ui_settings["hideMembershipEvents"]:
|
||||
self.client.skipped_events[room.room_id] += 1
|
||||
return None
|
||||
|
||||
reason = f". Reason: {now['reason']}" if now.get("reason") else ""
|
||||
|
||||
if membership == "join":
|
||||
|
@ -272,7 +276,7 @@ class NioCallbacks:
|
|||
account.display_name = now["displayname"] or ""
|
||||
account.avatar_url = now["avatar_url"] or ""
|
||||
|
||||
# Hide profile events from the timeline - XXX
|
||||
if self.client.backend.ui_settings["hideProfileChangeEvents"]:
|
||||
self.client.skipped_events[room.room_id] += 1
|
||||
return None
|
||||
|
||||
|
|
|
@ -211,6 +211,8 @@ class UISettings(JSONDataFile):
|
|||
"clearRoomFilterOnEnter": True,
|
||||
"clearRoomFilterOnEscape": True,
|
||||
"collapseSidePanesUnderWindowWidth": 400,
|
||||
"hideProfileChangeEvents": True,
|
||||
"hideMembershipEvents": False,
|
||||
"theme": "Midnight.qpl",
|
||||
"writeAliases": {},
|
||||
"media": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user