2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Recreating scheduled icon if it was changed

This commit is contained in:
RadRussianRus
2019-10-02 03:01:29 +03:00
parent 62fb670089
commit 9b1d8f5fb4

View File

@@ -1969,15 +1969,14 @@ void HistoryWidget::refreshScheduledToggle() {
_scheduled.destroy();
} else if (canWrite) {
if (_scheduled) {
_scheduled->setIconOverride(has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty);
} else {
_scheduled.create(this, (has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty));
_scheduled->show();
_scheduled->addClickHandler([=] {
controller()->showSection(
HistoryView::ScheduledMemento(_history));
});
_scheduled.destroy();
}
_scheduled.create(this, (has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty));
_scheduled->show();
_scheduled->addClickHandler([=] {
controller()->showSection(
HistoryView::ScheduledMemento(_history));
});
}
}