summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-10-07 17:59:03 +0000
committerNicolas Werner <nicolas.werner@hotmail.de>2021-10-07 20:01:55 +0200
commit569606f35b7b0ebbeba5eb5625a8f47fde4eb980 (patch)
tree01e884500f3f65096766885be1ef6f2c8b50acd3
parentRemove duplicated verification status calculation (diff)
downloadnheko-569606f35b7b0ebbeba5eb5625a8f47fde4eb980.tar.xz
Simplify device list refresh logic
-rw-r--r--resources/qml/dialogs/UserProfile.qml2
-rw-r--r--src/ui/UserProfile.cpp4
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_); }