Change decrypt setting again
This commit is contained in:
parent
18557023d9
commit
5893365439
3 changed files with 8 additions and 12 deletions
|
|
@ -511,20 +511,12 @@ isMessage(const mtx::events::EncryptedEvent<T> &)
|
|||
|
||||
void
|
||||
TimelineModel::updateLastMessage()
|
||||
{
|
||||
// Get the user setting to show decrypted messages in side bar
|
||||
bool decrypt = QSettings().value("user/decrypt_sidebar", true).toBool();
|
||||
updateLastMessage(decrypt);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineModel::updateLastMessage(bool decrypt)
|
||||
{
|
||||
for (auto it = eventOrder.begin(); it != eventOrder.end(); ++it) {
|
||||
auto event = events.value(*it);
|
||||
if (auto e = std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(
|
||||
&event)) {
|
||||
if (decrypt) {
|
||||
if (decryptDescription) {
|
||||
event = decryptEvent(*e).event;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue