2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +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(); _scheduled.destroy();
} else if (canWrite) { } else if (canWrite) {
if (_scheduled) { if (_scheduled) {
_scheduled->setIconOverride(has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty); _scheduled.destroy();
} else {
_scheduled.create(this, (has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty));
_scheduled->show();
_scheduled->addClickHandler([=] {
controller()->showSection(
HistoryView::ScheduledMemento(_history));
});
} }
_scheduled.create(this, (has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty));
_scheduled->show();
_scheduled->addClickHandler([=] {
controller()->showSection(
HistoryView::ScheduledMemento(_history));
});
} }
} }