2019-03-15 21:26:01 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "boxes/abstract_box.h"
|
2019-03-17 17:42:33 +00:00
|
|
|
#include "ui/widgets/checkbox.h"
|
2019-03-15 21:26:01 +00:00
|
|
|
|
|
|
|
enum class HistoryVisibility {
|
|
|
|
Visible,
|
|
|
|
Hidden,
|
|
|
|
};
|
|
|
|
|
|
|
|
class EditPeerHistoryVisibilityBox : public BoxContent {
|
|
|
|
public:
|
|
|
|
EditPeerHistoryVisibilityBox(
|
|
|
|
QWidget*,
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
FnMut<void(HistoryVisibility)> savedCallback,
|
2019-03-20 16:45:21 +00:00
|
|
|
HistoryVisibility historyVisibilitySavedValue);
|
2019-03-15 21:26:01 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void prepare() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setupContent();
|
|
|
|
|
|
|
|
not_null<PeerData*> _peer;
|
|
|
|
FnMut<void(HistoryVisibility)> _savedCallback;
|
|
|
|
|
2019-03-20 16:45:21 +00:00
|
|
|
HistoryVisibility _historyVisibilitySavedValue;
|
2019-03-19 15:45:46 +00:00
|
|
|
std::shared_ptr<Ui::RadioenumGroup<HistoryVisibility>> _historyVisibility;
|
2019-03-15 21:26:01 +00:00
|
|
|
|
|
|
|
};
|