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

Handle view resize/repaint requests for mainView.

This commit is contained in:
John Preston
2018-01-18 14:46:45 +03:00
parent d1a9d3992b
commit 91f369a0b3
19 changed files with 121 additions and 108 deletions

View File

@@ -127,7 +127,7 @@ ItemBase::ItemBase(not_null<HistoryItem*> parent) : _parent(parent) {
void ItemBase::clickHandlerActiveChanged(
const ClickHandlerPtr &action,
bool active) {
Auth().data().requestItemViewRepaint(_parent);
Auth().data().requestItemRepaint(_parent);
if (_check) {
_check->setActive(active);
}
@@ -136,7 +136,7 @@ void ItemBase::clickHandlerActiveChanged(
void ItemBase::clickHandlerPressedChanged(
const ClickHandlerPtr &action,
bool pressed) {
Auth().data().requestItemViewRepaint(_parent);
Auth().data().requestItemRepaint(_parent);
if (_check) {
_check->setPressed(pressed);
}
@@ -168,7 +168,7 @@ const style::RoundCheckbox &ItemBase::checkboxStyle() const {
void ItemBase::ensureCheckboxCreated() {
if (!_check) {
_check = std::make_unique<Checkbox>(
[=] { Auth().data().requestItemViewRepaint(_parent); },
[=] { Auth().data().requestItemRepaint(_parent); },
checkboxStyle());
}
}
@@ -203,7 +203,7 @@ void RadialProgressItem::clickHandlerActiveChanged(const ClickHandlerPtr &action
if (action == _openl || action == _savel || action == _cancell) {
if (iconAnimated()) {
_a_iconOver.start(
[=] { Auth().data().requestItemViewRepaint(parent()); },
[=] { Auth().data().requestItemRepaint(parent()); },
active ? 0. : 1.,
active ? 1. : 0.,
st::msgFileOverDuration);
@@ -219,7 +219,7 @@ void RadialProgressItem::setLinks(ClickHandlerPtr &&openl, ClickHandlerPtr &&sav
void RadialProgressItem::step_radial(TimeMs ms, bool timer) {
if (timer) {
Auth().data().requestItemViewRepaint(parent());
Auth().data().requestItemRepaint(parent());
} else {
_radial->update(dataProgress(), dataFinished(), ms);
if (!_radial->animating()) {