1
0
Fork 0
forked from blue/squawk

showing the button for encryption if there is at least one omemo key, trust summary update calculations

This commit is contained in:
Blue 2023-03-18 02:50:04 +03:00
parent 4f295fee3c
commit 69d797fe51
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
9 changed files with 134 additions and 39 deletions

View file

@ -206,10 +206,10 @@ Shared::TrustSummary Models::Contact::getTrust() const {
}
void Models::Contact::setTrust(const Shared::TrustSummary& p_trust) {
//if (trust != p_trust) {
if (trust != p_trust) {
trust = p_trust;
changed(8);
//}
}
}
@ -245,7 +245,11 @@ QString Models::Contact::getDisplayedName() const {
}
void Models::Contact::handleRecconnect() {
if (getMessagesCount() > 0) {
if (getMessagesCount() > 0)
feed->requestLatestMessages();
}
}
bool Models::Contact::hasKeys(Shared::EncryptionProtocol protocol) const {
return trust.hasKeys(protocol);
}

View file

@ -59,6 +59,7 @@ public:
QString getStatus() const;
QString getDisplayedName() const override;
Shared::TrustSummary getTrust() const;
bool hasKeys(Shared::EncryptionProtocol protocol) const;
void handleRecconnect(); //this is a special method Models::Roster calls when reconnect happens