Skip to content
Snippets Groups Projects
Unverified Commit 9bd29c97 authored by Loren Burkholder's avatar Loren Burkholder
Browse files

Allow configuring global hidden event settings

parent 03be9e47
No related branches found
No related tags found
No related merge requests found
Pipeline #5099 passed
...@@ -215,6 +215,24 @@ Rectangle { ...@@ -215,6 +215,24 @@ Rectangle {
} }
} }
} }
DelegateChoice {
roleValue: UserSettingsModel.ConfigureHiddenEvents
Button {
text: qsTr("CONFIGURE")
onClicked: {
var dialog = hiddenEventsDialog.createObject();
dialog.show();
destroyOnClose(dialog);
}
Component {
id: hiddenEventsDialog
HiddenEventsDialog {}
}
}
}
DelegateChoice { DelegateChoice {
Text { Text {
text: model.value text: model.value
......
...@@ -1041,6 +1041,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1041,6 +1041,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
return tr("Limit width of timeline"); return tr("Limit width of timeline");
case ReadReceipts: case ReadReceipts:
return tr("Read receipts"); return tr("Read receipts");
case HiddenTimelineEvents:
return tr("Hidden events");
case DesktopNotifications: case DesktopNotifications:
return tr("Desktop notifications"); return tr("Desktop notifications");
case AlertOnNotification: case AlertOnNotification:
...@@ -1119,6 +1121,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1119,6 +1121,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
return tr("SIDEBAR"); return tr("SIDEBAR");
case TraySection: case TraySection:
return tr("TRAY"); return tr("TRAY");
case MessageVisibilitySection:
return tr("GLOBAL MESSAGE VISIBILITY");
case NotificationsSection: case NotificationsSection:
return tr("NOTIFICATIONS"); return tr("NOTIFICATIONS");
case VoipSection: case VoipSection:
...@@ -1371,6 +1375,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1371,6 +1375,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
return tr( return tr(
"Show if your message was read.\nStatus is displayed next to timestamps.\nWarning: " "Show if your message was read.\nStatus is displayed next to timestamps.\nWarning: "
"If your homeserver does not support this, your rooms will never be marked as read!"); "If your homeserver does not support this, your rooms will never be marked as read!");
case HiddenTimelineEvents:
return tr("Configure whether to show or hide certain events like room joins.");
case DesktopNotifications: case DesktopNotifications:
return tr("Notify about received messages when the client is not currently focused."); return tr("Notify about received messages when the client is not currently focused.");
case AlertOnNotification: case AlertOnNotification:
...@@ -1438,6 +1444,7 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1438,6 +1444,7 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
case TimelineSection: case TimelineSection:
case SidebarSection: case SidebarSection:
case TraySection: case TraySection:
case MessageVisibilitySection:
case NotificationsSection: case NotificationsSection:
case VoipSection: case VoipSection:
case EncryptionSection: case EncryptionSection:
...@@ -1548,6 +1555,7 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1548,6 +1555,7 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
case TimelineSection: case TimelineSection:
case SidebarSection: case SidebarSection:
case TraySection: case TraySection:
case MessageVisibilitySection:
case NotificationsSection: case NotificationsSection:
case VoipSection: case VoipSection:
case EncryptionSection: case EncryptionSection:
...@@ -1562,6 +1570,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const ...@@ -1562,6 +1570,8 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
case UserSigningKey: case UserSigningKey:
case MasterKey: case MasterKey:
return KeyStatus; return KeyStatus;
case HiddenTimelineEvents:
return ConfigureHiddenEvents;
} }
} else if (role == ValueLowerBound) { } else if (role == ValueLowerBound) {
switch (index.row()) { switch (index.row()) {
......
...@@ -474,7 +474,6 @@ class UserSettingsModel : public QAbstractListModel ...@@ -474,7 +474,6 @@ class UserSettingsModel : public QAbstractListModel
ExposeDBusApi, ExposeDBusApi,
#endif #endif
UpdateSpaceVias, UpdateSpaceVias,
ExpireEvents,
AccessibilitySection, AccessibilitySection,
ReducedMotion, ReducedMotion,
...@@ -506,6 +505,10 @@ class UserSettingsModel : public QAbstractListModel ...@@ -506,6 +505,10 @@ class UserSettingsModel : public QAbstractListModel
Tray, Tray,
StartInTray, StartInTray,
MessageVisibilitySection,
ExpireEvents,
HiddenTimelineEvents,
NotificationsSection, NotificationsSection,
DesktopNotifications, DesktopNotifications,
AlertOnNotification, AlertOnNotification,
...@@ -562,6 +565,7 @@ public: ...@@ -562,6 +565,7 @@ public:
KeyStatus, KeyStatus,
SessionKeyImportExport, SessionKeyImportExport,
XSignKeysRequestDownload, XSignKeysRequestDownload,
ConfigureHiddenEvents,
}; };
Q_ENUM(Types); Q_ENUM(Types);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment