mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
parent
6d44c8e30d
commit
30ac76e942
1 changed files with 12 additions and 12 deletions
|
@ -97,11 +97,6 @@ UserSettings::load(std::optional<QString> profile)
|
|||
disableSwipe_ = settings.value("user/disable_swipe", false).toBool();
|
||||
emojiFont_ = settings.value("user/emoji_font_family", "emoji").toString();
|
||||
baseFontSize_ = settings.value("user/font_size", QFont().pointSizeF()).toDouble();
|
||||
auto tempPresence = settings.value("user/presence", "").toString().toStdString();
|
||||
auto presenceValue = QMetaEnum::fromType<Presence>().keyToValue(tempPresence.c_str());
|
||||
if (presenceValue < 0)
|
||||
presenceValue = 0;
|
||||
presence_ = static_cast<Presence>(presenceValue);
|
||||
ringtone_ = settings.value("user/ringtone", "Default").toString();
|
||||
microphone_ = settings.value("user/microphone", QString()).toString();
|
||||
camera_ = settings.value("user/camera", QString()).toString();
|
||||
|
@ -132,6 +127,11 @@ UserSettings::load(std::optional<QString> profile)
|
|||
hiddenWidgets_ = settings.value(prefix + "user/hidden_widgets", QStringList{}).toStringList();
|
||||
recentReactions_ =
|
||||
settings.value(prefix + "user/recent_reactions", QStringList{}).toStringList();
|
||||
auto tempPresence = settings.value(prefix + "user/presence", "").toString().toStdString();
|
||||
auto presenceValue = QMetaEnum::fromType<Presence>().keyToValue(tempPresence.c_str());
|
||||
if (presenceValue < 0)
|
||||
presenceValue = 0;
|
||||
presence_ = static_cast<Presence>(presenceValue);
|
||||
|
||||
collapsedSpaces_.clear();
|
||||
auto tempSpaces = settings.value(prefix + "user/collapsed_spaces", QList<QVariant>{}).toList();
|
||||
|
@ -914,9 +914,6 @@ UserSettings::save()
|
|||
settings.setValue("theme", theme());
|
||||
settings.setValue("font_family", font_);
|
||||
settings.setValue("emoji_font_family", emojiFont_);
|
||||
settings.setValue(
|
||||
"presence",
|
||||
QString::fromUtf8(QMetaEnum::fromType<Presence>().valueToKey(static_cast<int>(presence_))));
|
||||
settings.setValue("ringtone", ringtone_);
|
||||
settings.setValue("microphone", microphone_);
|
||||
settings.setValue("camera", camera_);
|
||||
|
@ -955,6 +952,9 @@ UserSettings::save()
|
|||
settings.setValue(prefix + "user/hidden_pins", hiddenPins_);
|
||||
settings.setValue(prefix + "user/hidden_widgets", hiddenWidgets_);
|
||||
settings.setValue(prefix + "user/recent_reactions", recentReactions_);
|
||||
settings.setValue(
|
||||
prefix + "user/presence",
|
||||
QString::fromUtf8(QMetaEnum::fromType<Presence>().valueToKey(static_cast<int>(presence_))));
|
||||
|
||||
QVariantList v;
|
||||
v.reserve(collapsedSpaces_.size());
|
||||
|
|
Loading…
Reference in a new issue