Simplify device list refresh logic

This commit is contained in:
DeepBlueV7.X 2021-10-07 17:59:03 +00:00 committed by Nicolas Werner
parent 47db1e5c65
commit 569606f35b
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 2 additions and 4 deletions

View file

@ -320,7 +320,7 @@ ApplicationWindow {
Button {
id: verifyButton
visible: (!profile.userVerificationEnabled && !profile.isSelf) || (profile.isSelf && (verificationStatus == VerificationStatus.UNVERIFIED || !profile.userVerificationEnabled))
visible: verificationStatus == VerificationStatus.UNVERIFIED && (profile.isSelf || !profile.userVerificationEnabled)
text: (verificationStatus != VerificationStatus.VERIFIED) ? qsTr("Verify") : qsTr("Unverify")
onClicked: {
if (verificationStatus == VerificationStatus.VERIFIED)

View file

@ -140,9 +140,7 @@ UserProfile::isSelf() const
void
UserProfile::refreshDevices()
{
std::vector<std::string> keysToRequest;
keysToRequest.push_back(this->userid_.toStdString());
cache::client()->markUserKeysOutOfDate(keysToRequest);
cache::client()->markUserKeysOutOfDate({this->userid_.toStdString()});
fetchDeviceList(this->userid_);
}