2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix build and working on macOS.

This commit is contained in:
John Preston
2020-06-19 21:13:43 +04:00
parent b49a8e6dc1
commit 3bb352e0e5
15 changed files with 83 additions and 52 deletions

View File

@@ -222,18 +222,12 @@ void Domain::writeAccounts() {
auto keySize = sizeof(qint32) + sizeof(qint32) * list.size();
const auto active = &_owner->active();
auto activeIndex = -1;
EncryptedDescriptor keyData(keySize);
keyData.stream << qint32(list.size());
for (const auto &[index, account] : list) {
if (active == account.get()) {
activeIndex = index;
}
keyData.stream << qint32(index);
}
keyData.stream << qint32(activeIndex);
keyData.stream << qint32(_owner->activeForStorage());
key.writeEncrypted(keyData, _localKey);
}