change \!disabled for enabled, because toggled return true if enabled
This commit is contained in:
parent
46605d86f2
commit
c5419f8783
@ -884,65 +884,65 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
|||||||
settings_->setStartInTray(enabled);
|
settings_->setStartInTray(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(mobileMode_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(mobileMode_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setMobileMode(!disabled);
|
settings_->setMobileMode(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(groupViewToggle_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(groupViewToggle_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setGroupView(!disabled);
|
settings_->setGroupView(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(decryptSidebar_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(decryptSidebar_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setDecryptSidebar(!disabled);
|
settings_->setDecryptSidebar(enabled);
|
||||||
emit decryptSidebarChanged();
|
emit decryptSidebarChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(shareKeysWithTrustedUsers_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(shareKeysWithTrustedUsers_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setShareKeysWithTrustedUsers(!disabled);
|
settings_->setShareKeysWithTrustedUsers(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(avatarCircles_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(avatarCircles_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setAvatarCircles(!disabled);
|
settings_->setAvatarCircles(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(markdown_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(markdown_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setMarkdown(!disabled);
|
settings_->setMarkdown(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(typingNotifications_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(typingNotifications_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setTypingNotifications(!disabled);
|
settings_->setTypingNotifications(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(sortByImportance_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(sortByImportance_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setSortByImportance(!disabled);
|
settings_->setSortByImportance(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(timelineButtonsToggle_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(timelineButtonsToggle_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setButtonsInTimeline(!disabled);
|
settings_->setButtonsInTimeline(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(readReceipts_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(readReceipts_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setReadReceipts(!disabled);
|
settings_->setReadReceipts(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(desktopNotifications_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(desktopNotifications_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setDesktopNotifications(!disabled);
|
settings_->setDesktopNotifications(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(alertOnNotification_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(alertOnNotification_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setAlertOnNotification(!disabled);
|
settings_->setAlertOnNotification(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(messageHoverHighlight_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(messageHoverHighlight_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setMessageHoverHighlight(!disabled);
|
settings_->setMessageHoverHighlight(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(enlargeEmojiOnlyMessages_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(enlargeEmojiOnlyMessages_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setEnlargeEmojiOnlyMessages(!disabled);
|
settings_->setEnlargeEmojiOnlyMessages(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(useStunServer_, &Toggle::toggled, this, [this](bool disabled) {
|
connect(useStunServer_, &Toggle::toggled, this, [this](bool enabled) {
|
||||||
settings_->setUseStunServer(!disabled);
|
settings_->setUseStunServer(enabled);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(timelineMaxWidthSpin_,
|
connect(timelineMaxWidthSpin_,
|
||||||
|
@ -857,7 +857,8 @@ WebRTCSession::acceptOffer(const std::string &sdp)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid a race that sometimes leaves the generated answer without media tracks (a=ssrc lines)
|
// avoid a race that sometimes leaves the generated answer without media tracks (a=ssrc
|
||||||
|
// lines)
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
|
||||||
// set-remote-description first, then create-answer
|
// set-remote-description first, then create-answer
|
||||||
|
Loading…
Reference in New Issue
Block a user