mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 13:08:48 +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 {
|
Button {
|
||||||
id: verifyButton
|
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")
|
text: (verificationStatus != VerificationStatus.VERIFIED) ? qsTr("Verify") : qsTr("Unverify")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (verificationStatus == VerificationStatus.VERIFIED)
|
if (verificationStatus == VerificationStatus.VERIFIED)
|
||||||
|
|
|
@ -140,9 +140,7 @@ UserProfile::isSelf() const
|
||||||
void
|
void
|
||||||
UserProfile::refreshDevices()
|
UserProfile::refreshDevices()
|
||||||
{
|
{
|
||||||
std::vector<std::string> keysToRequest;
|
cache::client()->markUserKeysOutOfDate({this->userid_.toStdString()});
|
||||||
keysToRequest.push_back(this->userid_.toStdString());
|
|
||||||
cache::client()->markUserKeysOutOfDate(keysToRequest);
|
|
||||||
fetchDeviceList(this->userid_);
|
fetchDeviceList(this->userid_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue