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:
parent
4f295fee3c
commit
69d797fe51
9 changed files with 134 additions and 39 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue