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
|
@ -138,7 +138,7 @@ bool Shared::TrustSummary::hasTrustedKeys(Shared::EncryptionProtocol protocol) c
|
|||
}
|
||||
|
||||
bool Shared::TrustSummary::hasUntrustedKeys(Shared::EncryptionProtocol protocol) const {
|
||||
Data::const_iterator itr = data.find(protocol);
|
||||
Data::const_iterator itr = data.find(protocol);
|
||||
if (itr == data.end())
|
||||
return false;
|
||||
|
||||
|
@ -149,3 +149,11 @@ bool Shared::TrustSummary::hasUntrustedKeys(Shared::EncryptionProtocol protocol)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Shared::TrustSummary::operator==(const Shared::TrustSummary& other) {
|
||||
return data == other.data;
|
||||
}
|
||||
|
||||
bool Shared::TrustSummary::operator!=(const Shared::TrustSummary& other) {
|
||||
return data != other.data;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,9 @@ class TrustSummary {
|
|||
public:
|
||||
TrustSummary();
|
||||
|
||||
bool operator == (const TrustSummary& other);
|
||||
bool operator != (const TrustSummary& other);
|
||||
|
||||
void set(EncryptionProtocol protocol, TrustLevel level, uint8_t amount);
|
||||
uint8_t increment(EncryptionProtocol protocol, TrustLevel level);
|
||||
uint8_t decrement(EncryptionProtocol protocol, TrustLevel level);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue