mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Replaced hardcoded threshold of gigagroup conversion with server value.
This commit is contained in:
@@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "main/main_session.h"
|
||||
#include "mtproto/mtproto_config.h" // megagroupSizeMax
|
||||
#include "apiwrap.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "styles/style_layers.h"
|
||||
@@ -49,7 +50,6 @@ namespace {
|
||||
|
||||
constexpr auto kSlowmodeValues = 7;
|
||||
constexpr auto kBoostsUnrestrictValues = 5;
|
||||
constexpr auto kSuggestGigagroupThreshold = 199000;
|
||||
constexpr auto kForceDisableTooltipDuration = 3 * crl::time(1000);
|
||||
|
||||
[[nodiscard]] auto Dependencies(PowerSaving::Flags)
|
||||
@@ -1189,8 +1189,11 @@ void ShowEditPeerPermissionsBox(
|
||||
});
|
||||
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
constexpr auto kThresholdOffset = int(1000);
|
||||
const auto threshold = -kThresholdOffset
|
||||
+ channel->session().serverConfig().megagroupSizeMax;
|
||||
if (channel->amCreator()
|
||||
&& channel->membersCount() >= kSuggestGigagroupThreshold) {
|
||||
&& channel->membersCount() >= threshold) {
|
||||
AddSuggestGigagroup(
|
||||
inner,
|
||||
AboutGigagroupCallback(
|
||||
|
||||
Reference in New Issue
Block a user