mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added dummy box class for statistics.
This commit is contained in:
parent
b0a65885c9
commit
10968d0da2
4 changed files with 43 additions and 0 deletions
|
@ -1278,6 +1278,8 @@ PRIVATE
|
||||||
settings/settings_type.h
|
settings/settings_type.h
|
||||||
settings/settings_websites.cpp
|
settings/settings_websites.cpp
|
||||||
settings/settings_websites.h
|
settings/settings_websites.h
|
||||||
|
statistics/statistics_box.cpp
|
||||||
|
statistics/statistics_box.h
|
||||||
storage/details/storage_file_utilities.cpp
|
storage/details/storage_file_utilities.cpp
|
||||||
storage/details/storage_file_utilities.h
|
storage/details/storage_file_utilities.h
|
||||||
storage/details/storage_settings_scheme.cpp
|
storage/details/storage_settings_scheme.cpp
|
||||||
|
|
19
Telegram/SourceFiles/statistics/statistics_box.cpp
Normal file
19
Telegram/SourceFiles/statistics/statistics_box.cpp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include "statistics/statistics_box.h"
|
||||||
|
|
||||||
|
#include "data/data_peer.h"
|
||||||
|
#include "lang/lang_keys.h"
|
||||||
|
#include "ui/layers/generic_box.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
void StatisticsBox(not_null<Ui::GenericBox*> box, not_null<PeerData*> peer) {
|
||||||
|
box->setTitle(tr::lng_stats_title());
|
||||||
|
}
|
16
Telegram/SourceFiles/statistics/statistics_box.h
Normal file
16
Telegram/SourceFiles/statistics/statistics_box.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
class PeerData;
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class GenericBox;
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
void StatisticsBox(not_null<Ui::GenericBox*> box, not_null<PeerData*> peer);
|
|
@ -85,6 +85,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "export/export_manager.h"
|
#include "export/export_manager.h"
|
||||||
#include "boxes/peers/edit_peer_info_box.h"
|
#include "boxes/peers/edit_peer_info_box.h"
|
||||||
|
#include "statistics/statistics_box.h"
|
||||||
#include "styles/style_chat.h"
|
#include "styles/style_chat.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
@ -999,12 +1000,17 @@ void Filler::addManageChat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filler::addViewStatistics() {
|
void Filler::addViewStatistics() {
|
||||||
|
#ifdef _DEBUG
|
||||||
if (const auto channel = _peer->asChannel()) {
|
if (const auto channel = _peer->asChannel()) {
|
||||||
if (channel->flags() & ChannelDataFlag::CanGetStatistics) {
|
if (channel->flags() & ChannelDataFlag::CanGetStatistics) {
|
||||||
|
const auto navigation = _controller;
|
||||||
|
const auto peer = _peer;
|
||||||
_addAction(tr::lng_stats_title(tr::now), [=] {
|
_addAction(tr::lng_stats_title(tr::now), [=] {
|
||||||
|
navigation->show(Box(StatisticsBox, peer));
|
||||||
}, nullptr);
|
}, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filler::addCreatePoll() {
|
void Filler::addCreatePoll() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue