mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +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) {
|
) | rpl::start_with_next([=](Controls::WriteRestriction value) {
|
||||||
using Type = Controls::WriteRestriction::Type;
|
using Type = Controls::WriteRestriction::Type;
|
||||||
if (value.type == Type::Frozen) {
|
if (value.type == Type::Frozen) {
|
||||||
|
state->icon = nullptr;
|
||||||
|
state->unlock = nullptr;
|
||||||
|
state->label = nullptr;
|
||||||
state->button = FrozenWriteRestriction(
|
state->button = FrozenWriteRestriction(
|
||||||
widget,
|
widget,
|
||||||
show,
|
show,
|
||||||
FrozenWriteRestrictionType::MessageField);
|
FrozenWriteRestrictionType::MessageField);
|
||||||
} else if (const auto lifting = value.boostsToLift) {
|
} else if (const auto lifting = value.boostsToLift) {
|
||||||
|
state->icon = nullptr;
|
||||||
|
state->unlock = nullptr;
|
||||||
|
state->label = nullptr;
|
||||||
state->button = BoostsToLiftWriteRestriction(
|
state->button = BoostsToLiftWriteRestriction(
|
||||||
widget,
|
widget,
|
||||||
show,
|
show,
|
||||||
|
|
Loading…
Add table
Reference in a new issue