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"
|
|
|
|
|
|
|
|
class AuthSession;
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
class Changelogs : public base::has_weak_ptr, private base::Subscriber {
|
|
|
|
public:
|
|
|
|
Changelogs(not_null<AuthSession*> session, int oldVersion);
|
|
|
|
|
|
|
|
static std::unique_ptr<Changelogs> Create(
|
|
|
|
not_null<AuthSession*> session);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void requestCloudLogs();
|
|
|
|
void addLocalLogs();
|
|
|
|
void addLocalLog(const QString &text);
|
|
|
|
void addAlphaLogs();
|
|
|
|
void addAlphaLog(int changeVersion, const char *changes);
|
|
|
|
|
|
|
|
const not_null<AuthSession*> _session;
|
|
|
|
const int _oldVersion = 0;
|
|
|
|
int _chatsSubscription = 0;
|
|
|
|
bool _addedSomeLocal = false;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Core
|