mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix possible crash in restrictions.
This commit is contained in:
@@ -2325,11 +2325,17 @@ void SetupRestrictionView(
|
||||
) | rpl::start_with_next([=](Controls::WriteRestriction value) {
|
||||
using Type = Controls::WriteRestriction::Type;
|
||||
if (value.type == Type::Frozen) {
|
||||
state->icon = nullptr;
|
||||
state->unlock = nullptr;
|
||||
state->label = nullptr;
|
||||
state->button = FrozenWriteRestriction(
|
||||
widget,
|
||||
show,
|
||||
FrozenWriteRestrictionType::MessageField);
|
||||
} else if (const auto lifting = value.boostsToLift) {
|
||||
state->icon = nullptr;
|
||||
state->unlock = nullptr;
|
||||
state->label = nullptr;
|
||||
state->button = BoostsToLiftWriteRestriction(
|
||||
widget,
|
||||
show,
|
||||
|
||||
Reference in New Issue
Block a user