mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fix premium users deselection in multi-select field.
This commit is contained in:
parent
0152d2c48e
commit
7c44cda76e
2 changed files with 6 additions and 7 deletions
|
@ -159,8 +159,6 @@ public:
|
|||
-> rpl::producer<RowSelectionChange>;
|
||||
|
||||
private:
|
||||
[[nodiscard]] std::unique_ptr<PeerListRow> createRow() const;
|
||||
|
||||
const not_null<Main::Session*> _session;
|
||||
bool _premiums = false;
|
||||
|
||||
|
@ -331,6 +329,9 @@ auto PrivacyExceptionsBoxController::preparePremiumsRowList()
|
|||
|
||||
_deselectOption = [=](PeerListRowId itemId) {
|
||||
if (const auto row = _typesDelegate->peerListFindRow(itemId)) {
|
||||
if (itemId == kPremiumsRowId) {
|
||||
_selected.premiums = false;
|
||||
}
|
||||
_typesDelegate->peerListSetRowChecked(row, false);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1039,11 +1039,9 @@ void PeerListContent::changeCheckState(
|
|||
not_null<PeerListRow*> row,
|
||||
bool checked,
|
||||
anim::type animated) {
|
||||
row->setChecked(
|
||||
checked,
|
||||
_st.item.checkbox,
|
||||
animated,
|
||||
[=] { updateRow(row); });
|
||||
row->setChecked(checked, _st.item.checkbox, animated, [=] {
|
||||
updateRow(row);
|
||||
});
|
||||
}
|
||||
|
||||
void PeerListContent::setRowHidden(not_null<PeerListRow*> row, bool hidden) {
|
||||
|
|
Loading…
Add table
Reference in a new issue