2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Added dummy box class for statistics.

This commit is contained in:
23rd
2023-04-26 22:06:54 +03:00
committed by John Preston
parent b0a65885c9
commit 10968d0da2
4 changed files with 43 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "export/export_manager.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "statistics/statistics_box.h"
#include "styles/style_chat.h"
#include "styles/style_layers.h"
#include "styles/style_boxes.h"
@@ -999,12 +1000,17 @@ void Filler::addManageChat() {
}
void Filler::addViewStatistics() {
#ifdef _DEBUG
if (const auto channel = _peer->asChannel()) {
if (channel->flags() & ChannelDataFlag::CanGetStatistics) {
const auto navigation = _controller;
const auto peer = _peer;
_addAction(tr::lng_stats_title(tr::now), [=] {
navigation->show(Box(StatisticsBox, peer));
}, nullptr);
}
}
#endif
}
void Filler::addCreatePoll() {