2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Move session data localstorage -> storage_account.

This commit is contained in:
John Preston
2020-06-09 20:57:05 +04:00
parent 739a3ebe97
commit ad4afe9293
64 changed files with 5190 additions and 4652 deletions

View File

@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/add_contact_box.h"
#include "boxes/connection_box.h"
#include "observer_peer.h"
#include "storage/storage_account.h"
#include "storage/localstorage.h"
#include "apiwrap.h"
#include "settings/settings_intro.h"
@@ -791,7 +792,7 @@ void MainWindow::toggleDisplayNotifyFromTray() {
Global::SetRestoreFlashBounceNotifyFromTray(false);
}
}
Local::writeUserSettings();
account().local().writeSettings();
using Change = Window::Notifications::ChangeType;
auto &changes = account().session().notifications().settingsChanged();
changes.notify(Change::DesktopEnabled);
@@ -850,13 +851,6 @@ MainWindow::TempDirState MainWindow::tempDirState() {
return QDir(cTempDir()).exists() ? TempDirExists : TempDirEmpty;
}
MainWindow::TempDirState MainWindow::localStorageState() {
if (_clearManager && _clearManager->hasTask(Local::ClearManagerStorage)) {
return TempDirRemoving;
}
return TempDirEmpty;
}
void MainWindow::tempDirDelete(int task) {
if (_clearManager) {
if (_clearManager->addTask(task)) {