2017-12-29 18:17:07 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-12-29 18:17:07 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-12-29 18:17:07 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "base/weak_ptr.h"
|
|
|
|
|
2019-07-24 11:45:24 +00:00
|
|
|
namespace Main {
|
|
|
|
class Session;
|
|
|
|
} // namespace Main
|
2017-12-29 18:17:07 +00:00
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
2020-09-08 15:01:12 +00:00
|
|
|
[[nodiscard]] QString FormatVersionDisplay(int version);
|
|
|
|
[[nodiscard]] QString FormatVersionPrecise(int version);
|
|
|
|
|
2021-07-15 11:12:38 +00:00
|
|
|
class Changelogs final : public base::has_weak_ptr {
|
2017-12-29 18:17:07 +00:00
|
|
|
public:
|
2019-07-24 11:45:24 +00:00
|
|
|
Changelogs(not_null<Main::Session*> session, int oldVersion);
|
2017-12-29 18:17:07 +00:00
|
|
|
|
|
|
|
static std::unique_ptr<Changelogs> Create(
|
2019-07-24 11:45:24 +00:00
|
|
|
not_null<Main::Session*> session);
|
2017-12-29 18:17:07 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void requestCloudLogs();
|
|
|
|
void addLocalLogs();
|
|
|
|
void addLocalLog(const QString &text);
|
2018-09-26 14:58:09 +00:00
|
|
|
void addBetaLogs();
|
|
|
|
void addBetaLog(int changeVersion, const char *changes);
|
2017-12-29 18:17:07 +00:00
|
|
|
|
2019-07-24 11:45:24 +00:00
|
|
|
const not_null<Main::Session*> _session;
|
2017-12-29 18:17:07 +00:00
|
|
|
const int _oldVersion = 0;
|
2019-04-18 08:28:43 +00:00
|
|
|
rpl::lifetime _chatsSubscription;
|
2017-12-29 18:17:07 +00:00
|
|
|
bool _addedSomeLocal = false;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Core
|