mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 21:18:48 +03:00
Don't add toggle for jdenticon if the plugin can't be found
This commit is contained in:
parent
0e931456ee
commit
069115ba5f
1 changed files with 9 additions and 5 deletions
|
@ -757,7 +757,6 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
||||||
trayToggle_ = new Toggle{this};
|
trayToggle_ = new Toggle{this};
|
||||||
startInTrayToggle_ = new Toggle{this};
|
startInTrayToggle_ = new Toggle{this};
|
||||||
avatarCircles_ = new Toggle{this};
|
avatarCircles_ = new Toggle{this};
|
||||||
useIdenticon_ = new Toggle{this};
|
|
||||||
decryptSidebar_ = new Toggle(this);
|
decryptSidebar_ = new Toggle(this);
|
||||||
privacyScreen_ = new Toggle{this};
|
privacyScreen_ = new Toggle{this};
|
||||||
onlyShareKeysWithVerifiedUsers_ = new Toggle(this);
|
onlyShareKeysWithVerifiedUsers_ = new Toggle(this);
|
||||||
|
@ -791,7 +790,6 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
||||||
trayToggle_->setChecked(settings_->tray());
|
trayToggle_->setChecked(settings_->tray());
|
||||||
startInTrayToggle_->setChecked(settings_->startInTray());
|
startInTrayToggle_->setChecked(settings_->startInTray());
|
||||||
avatarCircles_->setChecked(settings_->avatarCircles());
|
avatarCircles_->setChecked(settings_->avatarCircles());
|
||||||
useIdenticon_->setChecked(settings_->useIdenticon());
|
|
||||||
decryptSidebar_->setChecked(settings_->decryptSidebar());
|
decryptSidebar_->setChecked(settings_->decryptSidebar());
|
||||||
privacyScreen_->setChecked(settings_->privacyScreen());
|
privacyScreen_->setChecked(settings_->privacyScreen());
|
||||||
onlyShareKeysWithVerifiedUsers_->setChecked(settings_->onlyShareKeysWithVerifiedUsers());
|
onlyShareKeysWithVerifiedUsers_->setChecked(settings_->onlyShareKeysWithVerifiedUsers());
|
||||||
|
@ -811,6 +809,11 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
||||||
useStunServer_->setChecked(settings_->useStunServer());
|
useStunServer_->setChecked(settings_->useStunServer());
|
||||||
mobileMode_->setChecked(settings_->mobileMode());
|
mobileMode_->setChecked(settings_->mobileMode());
|
||||||
|
|
||||||
|
if (JdenticonProvider::isAvailable()) {
|
||||||
|
useIdenticon_ = new Toggle{this};
|
||||||
|
useIdenticon_->setChecked(settings_->useIdenticon());
|
||||||
|
}
|
||||||
|
|
||||||
if (!settings_->tray()) {
|
if (!settings_->tray()) {
|
||||||
startInTrayToggle_->setState(false);
|
startInTrayToggle_->setState(false);
|
||||||
startInTrayToggle_->setDisabled(true);
|
startInTrayToggle_->setDisabled(true);
|
||||||
|
@ -1282,6 +1285,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
||||||
settings_->setAvatarCircles(enabled);
|
settings_->setAvatarCircles(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (JdenticonProvider::isAvailable())
|
||||||
connect(useIdenticon_, &Toggle::toggled, this, [this](bool enabled) {
|
connect(useIdenticon_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setUseIdenticon(enabled);
|
settings_->setUseIdenticon(enabled);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue