mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Allow configuring global hidden event settings
This commit is contained in:
parent
03be9e479a
commit
9bd29c9713
3 changed files with 33 additions and 1 deletions
|
@ -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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
ExposeDBusApi,
|
ExposeDBusApi,
|
||||||
#endif
|
#endif
|
||||||
UpdateSpaceVias,
|
UpdateSpaceVias,
|
||||||
ExpireEvents,
|
|
||||||
|
|
||||||
AccessibilitySection,
|
AccessibilitySection,
|
||||||
ReducedMotion,
|
ReducedMotion,
|
||||||
|
@ -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:
|
||||||
KeyStatus,
|
KeyStatus,
|
||||||
SessionKeyImportExport,
|
SessionKeyImportExport,
|
||||||
XSignKeysRequestDownload,
|
XSignKeysRequestDownload,
|
||||||
|
ConfigureHiddenEvents,
|
||||||
};
|
};
|
||||||
Q_ENUM(Types);
|
Q_ENUM(Types);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue