2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Add some helper methods to effect wrappers.

Add and use similar methods to WidgetSlideWrap and WidgetFadeWrap:
[show|hide|toggle]Fast() and [show|hide|toggle]Animated().
This commit is contained in:
John Preston
2017-03-15 18:10:18 +03:00
parent fed20435ad
commit 1027bd431a
16 changed files with 80 additions and 131 deletions

View File

@@ -3054,16 +3054,11 @@ void DialogsWidget::updateLockUnlockVisibility() {
void DialogsWidget::updateJumpToDateVisibility(bool fast) {
if (_a_show.animating()) return;
if (_searchInPeer && _filter->getLastText().isEmpty()) {
if (fast) {
_jumpToDate->showFast();
} else {
_jumpToDate->showAnimated();
}
} else if (fast) {
_jumpToDate->hideFast();
auto jumpToDateVisible = (_searchInPeer && _filter->getLastText().isEmpty());
if (fast) {
_jumpToDate->toggleFast(jumpToDateVisible);
} else {
_jumpToDate->hideAnimated();
_jumpToDate->toggleAnimated(jumpToDateVisible);
}
}