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

Fix saving of playback position for long videos.

This commit is contained in:
John Preston
2019-12-27 17:09:55 +03:00
parent ac48ec5969
commit 79870600d9
4 changed files with 20 additions and 2 deletions

View File

@@ -123,7 +123,14 @@ Application::Application(not_null<Launcher*> launcher)
Application::~Application() {
_window.reset();
_mediaView.reset();
if (_mediaView) {
_mediaView->clearData();
_mediaView = nullptr;
}
if (activeAccount().sessionExists()) {
activeAccount().session().saveSettingsNowIfNeeded();
}
// This can call writeMap() that serializes Main::Session.
// In case it gets called after destroySession() we get missing data.