Implement #132.
This commit is contained in:
@@ -201,6 +201,40 @@ Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
Control {
|
||||
width: parent.width
|
||||
|
||||
contentItem: RowLayout {
|
||||
MaterialIcon {
|
||||
Layout.preferredWidth: 48
|
||||
Layout.preferredHeight: 48
|
||||
|
||||
color: MPalette.foreground
|
||||
icon: "\ue8f8"
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
|
||||
color: MPalette.foreground
|
||||
text: "Show Join/Leave"
|
||||
}
|
||||
|
||||
Switch {
|
||||
id: showJoinLeaveSwitch
|
||||
|
||||
checked: MSettings.value("UI/show_joinleave", true)
|
||||
onCheckedChanged: MSettings.setValue("UI/show_joinleave", checked)
|
||||
}
|
||||
}
|
||||
|
||||
RippleEffect {
|
||||
anchors.fill: parent
|
||||
|
||||
onPrimaryClicked: showJoinLeaveSwitch.checked = !showJoinLeaveSwitch.checked
|
||||
}
|
||||
}
|
||||
|
||||
Control {
|
||||
width: parent.width
|
||||
|
||||
|
||||
@@ -350,6 +350,13 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
|
||||
if (isPending)
|
||||
return pendingIt->deliveryStatus();
|
||||
|
||||
auto* memberEvent = timelineIt->viewAs<RoomMemberEvent>();
|
||||
if (memberEvent) {
|
||||
if ((memberEvent->isJoin() || memberEvent->isLeave()) &&
|
||||
!Settings().value("UI/show_joinleave", true).toBool())
|
||||
return EventStatus::Hidden;
|
||||
}
|
||||
|
||||
if (is<RedactionEvent>(evt))
|
||||
return EventStatus::Hidden;
|
||||
if (evt.isRedacted())
|
||||
|
||||
Reference in New Issue
Block a user