mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use crl::time/now instead of TimeMs/getms.
This commit is contained in:
@@ -76,7 +76,7 @@ void Inner::visibleTopBottomUpdated(
|
||||
_visibleBottom = visibleBottom;
|
||||
if (_visibleTop != visibleTop) {
|
||||
_visibleTop = visibleTop;
|
||||
_lastScrolled = getms();
|
||||
_lastScrolled = crl::now();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void Inner::paintInlineItems(Painter &p, const QRect &r) {
|
||||
return;
|
||||
}
|
||||
auto gifPaused = _controller->isGifPausedAtLeastFor(Window::GifPauseReason::InlineResults);
|
||||
InlineBots::Layout::PaintContext context(getms(), false, gifPaused, false);
|
||||
InlineBots::Layout::PaintContext context(crl::now(), false, gifPaused, false);
|
||||
|
||||
auto top = st::stickerPanPadding;
|
||||
if (_switchPmButton) {
|
||||
@@ -570,7 +570,7 @@ void Inner::inlineItemLayoutChanged(const ItemBase *layout) {
|
||||
}
|
||||
|
||||
void Inner::inlineItemRepaint(const ItemBase *layout) {
|
||||
auto ms = getms();
|
||||
auto ms = crl::now();
|
||||
if (_lastScrolled + 100 <= ms) {
|
||||
update();
|
||||
} else {
|
||||
@@ -701,7 +701,7 @@ void Inner::showPreview() {
|
||||
}
|
||||
|
||||
void Inner::updateInlineItems() {
|
||||
auto ms = getms();
|
||||
auto ms = crl::now();
|
||||
if (_lastScrolled + 100 <= ms) {
|
||||
update();
|
||||
} else {
|
||||
@@ -804,7 +804,7 @@ void Widget::onWndActiveChanged() {
|
||||
void Widget::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
auto ms = getms();
|
||||
auto ms = crl::now();
|
||||
|
||||
// This call can finish _a_show animation and destroy _showAnimation.
|
||||
auto opacityAnimating = _a_opacity.animating(ms);
|
||||
|
Reference in New Issue
Block a user