mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Simplify device list refresh logic
This commit is contained in:
parent
47db1e5c65
commit
569606f35b
2 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue