mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Fix possible crash in restrictions.
This commit is contained in:
parent
837a3528cd
commit
bbcd27d3c2
1 changed files with 6 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue