Simplify device list refresh logic
2 files changed, 2 insertions, 4 deletions
diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index 86822bdf..d5442382 100644
--- a/resources/qml/dialogs/UserProfile.qml
+++ b/resources/qml/dialogs/UserProfile.qml
@@ -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)
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp
index 5ddf011f..31ae9f8b 100644
--- a/src/ui/UserProfile.cpp
+++ b/src/ui/UserProfile.cpp
@@ -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_);
}
|