Version 1.4.9: Use bare way to read option

This commit is contained in:
Eric Kotato 2022-03-08 19:07:57 +03:00 committed by GitHub
parent c528bf86cd
commit e5dcf48d43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,11 +164,13 @@ LocalFolder MakeLocalFolder(const QJsonObject &obj) {
});
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()) {
result.flags |= flag;
}
});
}
}
const auto readChatsArray = [obj] (const QString &key, std::vector<uint64> &chats) {