mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed possible crash for bot owners in earn section for bots.
This commit is contained in:
parent
074bb1e66e
commit
49223a4688
1 changed files with 4 additions and 4 deletions
|
@ -833,7 +833,7 @@ void InnerWidget::fill() {
|
||||||
Ui::AddSkip(container);
|
Ui::AddSkip(container);
|
||||||
}
|
}
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
if (!channel->amCreator()) {
|
if (channel && !channel->amCreator()) {
|
||||||
Ui::AddSkip(container);
|
Ui::AddSkip(container);
|
||||||
Ui::AddSkip(container);
|
Ui::AddSkip(container);
|
||||||
return;
|
return;
|
||||||
|
@ -1346,8 +1346,8 @@ void InnerWidget::fill() {
|
||||||
handleSlice(firstSlice);
|
handleSlice(firstSlice);
|
||||||
if (!firstSlice.allLoaded) {
|
if (!firstSlice.allLoaded) {
|
||||||
struct ShowMoreState final {
|
struct ShowMoreState final {
|
||||||
ShowMoreState(not_null<ChannelData*> channel)
|
ShowMoreState(not_null<PeerData*> peer)
|
||||||
: api(channel) {
|
: api(peer) {
|
||||||
}
|
}
|
||||||
Api::EarnStatistics api;
|
Api::EarnStatistics api;
|
||||||
bool loading = false;
|
bool loading = false;
|
||||||
|
@ -1355,7 +1355,7 @@ void InnerWidget::fill() {
|
||||||
rpl::variable<int> showed = 0;
|
rpl::variable<int> showed = 0;
|
||||||
};
|
};
|
||||||
const auto state
|
const auto state
|
||||||
= lifetime().make_state<ShowMoreState>(channel);
|
= lifetime().make_state<ShowMoreState>(_peer);
|
||||||
state->token = firstSlice.token;
|
state->token = firstSlice.token;
|
||||||
state->showed = firstSlice.list.size();
|
state->showed = firstSlice.list.size();
|
||||||
const auto max = firstSlice.total;
|
const auto max = firstSlice.total;
|
||||||
|
|
Loading…
Add table
Reference in a new issue