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

Move export management to Core::App.

This commit is contained in:
John Preston
2020-06-25 11:14:05 +04:00
parent 28cafb129e
commit 65050bf9dd
16 changed files with 209 additions and 104 deletions

View File

@@ -15,7 +15,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mtproto/mtproto_config.h"
#include "mtproto/mtproto_dc_options.h"
#include "storage/storage_domain.h"
#include "storage/storage_account.h"
#include "storage/localstorage.h"
#include "export/export_settings.h"
#include "facades.h"
namespace Main {
@@ -93,6 +95,15 @@ void Domain::activateAfterStarting() {
activate(toActivate);
removePasscodeIfEmpty();
for (const auto &[index, account] : _accounts) {
if (const auto session = account->maybeSession()) {
const auto settings = session->local().readExportSettings();
if (const auto availableAt = settings.availableAt) {
session->data().suggestStartExport(availableAt);
}
}
}
}
const std::vector<Domain::AccountWithIndex> &Domain::accounts() const {