2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

context bots started, all callbacks done by pointers

This commit is contained in:
John Preston
2015-12-29 00:20:04 +03:00
parent 43e173567f
commit 77228d358d
22 changed files with 416 additions and 237 deletions

View File

@@ -260,10 +260,7 @@ void LayoutRadialProgressItem::checkRadialFinished() {
}
LayoutRadialProgressItem::~LayoutRadialProgressItem() {
if (_radial) {
delete _radial;
setBadPointer(_radial);
}
deleteAndMark(_radial);
}
void LayoutAbstractFileItem::setStatusSize(int32 newSize, int32 fullSize, int32 duration, qint64 realDuration) const {
@@ -1318,7 +1315,7 @@ void LayoutSavedGif::notify_over(bool over) {
if (!_data->loaded()) {
ensureAnimation();
if (over == !(_state & StateOver)) {
EnsureAnimation(_animation->_a_over, (_state & StateOver) ? 1 : 0, (func(this, &LayoutSavedGif::update)));
EnsureAnimation(_animation->_a_over, (_state & StateOver) ? 1 : 0, func(this, &LayoutSavedGif::update));
_animation->_a_over.start(over ? 1 : 0, st::stickersRowDuration);
}
}
@@ -1450,8 +1447,7 @@ void LayoutSavedGif::preload() {
}
LayoutSavedGif::~LayoutSavedGif() {
delete _animation;
setBadPointer(_animation);
deleteAndMark(_animation);
}
void LayoutSavedGif::ensureAnimation() const {
@@ -1501,7 +1497,11 @@ void LayoutSavedGif::clipCallback(ClipReaderNotification notification) {
update();
} break;
case ClipReaderRepaint: update(); break;
case ClipReaderRepaint: {
if (gif() && !_gif->currentDisplayed()) {
update();
}
} break;
}
}