@@ -95,6 +95,7 @@ For license and copyright information please follow this link:
9595namespace Dialogs {
9696namespace {
9797
98+ constexpr auto kFreezeTimeout = crl::time(5000 );
9899constexpr auto kHashtagResultsLimit = 5 ;
99100constexpr auto kStartReorderThreshold = 30 ;
100101constexpr auto kStartDragToFilterThresholdX = kStartReorderThreshold ;
@@ -291,7 +292,8 @@ InnerWidget::InnerWidget(
291292, _narrowWidth(st::defaultDialogRow.padding.left()
292293 + st::defaultDialogRow.photoSize
293294 + st::defaultDialogRow.padding.left())
294- , _childListShown(std::move(childListShown)) {
295+ , _childListShown(std::move(childListShown))
296+ , _freezeTimer([=] { _shownList->unfreeze (); update (); }) {
295297 setAttribute (Qt::WA_OpaquePaintEvent, true );
296298
297299 style::PaletteChanged (
@@ -1678,6 +1680,13 @@ void InnerWidget::mouseMoveEvent(QMouseEvent *e) {
16781680 return ;
16791681 }
16801682
1683+ if (_lastMousePosition && *_lastMousePosition != globalPosition) {
1684+ if (!_freezeTimer.isActive ()) {
1685+ _shownList->freeze ();
1686+ }
1687+ _freezeTimer.callOnce (kFreezeTimeout );
1688+ }
1689+
16811690 if (_pressed && (e->buttons () & Qt::LeftButton)) {
16821691 const auto local = e->pos ();
16831692 const auto outside = _dragging ? false : true ;
@@ -3052,6 +3061,8 @@ void InnerWidget::updateDialogRow(
30523061
30533062void InnerWidget::enterEventHook (QEnterEvent *e) {
30543063 setMouseTracking (true );
3064+ _shownList->freeze ();
3065+ _freezeTimer.callOnce (kFreezeTimeout );
30553066}
30563067
30573068Row *InnerWidget::shownRowByKey (Key key) {
@@ -3134,14 +3145,18 @@ void InnerWidget::refreshShownList() {
31343145 ? session ().data ().chatsFilters ().chatsList (_filterId)->indexed ()
31353146 : session ().data ().chatsList (_openedFolder)->indexed ();
31363147 if (_shownList != list) {
3148+ _shownList->unfreeze ();
31373149 _shownList = list;
31383150 _shownList->updateHeights (_narrowRatio);
31393151 }
31403152}
31413153
31423154void InnerWidget::leaveEventHook (QEvent *e) {
31433155 setMouseTracking (false );
3156+ _freezeTimer.cancel ();
3157+ _shownList->unfreeze ();
31443158 clearSelection ();
3159+ update ();
31453160}
31463161
31473162void InnerWidget::dragLeft () {
0 commit comments