Version 1.4.9: Use bare way to read option
This commit is contained in:
parent
c528bf86cd
commit
e5dcf48d43
1 changed files with 4 additions and 2 deletions
|
|
@ -164,11 +164,13 @@ LocalFolder MakeLocalFolder(const QJsonObject &obj) {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const auto &[flag, option] : LocalFolderSettingsFlags) {
|
for (const auto &[flag, option] : LocalFolderSettingsFlags) {
|
||||||
ReadOption(obj, option, [&](auto v) {
|
const auto it = obj.constFind(option);
|
||||||
|
if (it != obj.constEnd()) {
|
||||||
|
const auto v = *it;
|
||||||
if (v.isBool() && v.toBool()) {
|
if (v.isBool() && v.toBool()) {
|
||||||
result.flags |= flag;
|
result.flags |= flag;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto readChatsArray = [obj] (const QString &key, std::vector<uint64> &chats) {
|
const auto readChatsArray = [obj] (const QString &key, std::vector<uint64> &chats) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue