Fix unability to scroll file view when files are constantly refreshing
AbandonedPublic

Authored by martinkostolny on Mar 25 2018, 8:27 PM.

Details

Reviewers
nmel
Group Reviewers
Krusader
Summary

When one is e.g. downloading a big file -> view is constantly refreshing.
For every add/remove of a file item there is an explicit call to make
a current item visible. This patch removes this call.

Any suggestions to approach this issue differently are appreciated.

FIXED: [ 392218 ] Cannot scrolling with mouse through list of files in view panel because of 'auto refresh', when download/copying files
BUG: 392218

Test Plan

I don't know about a use-case that might be broken by this change. Ideally please use this diff couple of days and if there are no issues, hopefully it is sucessfully tested :).

Diff Detail

Repository
R167 Krusader
Branch
refresh-listpanel-fix
Lint
No Linters Available
Unit
No Unit Test Coverage
martinkostolny requested review of this revision.Mar 25 2018, 8:27 PM
martinkostolny created this revision.
nmel added a subscriber: nmel.Mar 26 2018, 8:46 AM

It was added here:

commit a55ef906ae595065a3b3dcaf2f9dd1cb2fd4b7b2
Author: Csaba Karai <cskarai@freemail.hu>, Mon Apr 13 22:11:06 2009 +0000 (9 years ago)
Committer: Csaba Karai <cskarai@freemail.hu>, Mon Apr 13 22:11:06 2009 +0000 (9 years ago)
Follows: v2.0.0
Precedes: v2.1.0-beta1
Branches: <Expand>

FIXED: [ 2609483 ] unpacking to directories with international chars +
interview fixes

Do you know if we can access old issues by a number?

One of the use cases I can imagine is copy small files to the folder so that new items appear before current item - so the current item will be pushed down and become invisible quickly. Just an idea, I haven't tested it yet.

Thanks for taking the time to trace the code changes!

But I'm not sure we are talking about the same issue. The current bug report (392218) has a video attachment which shows the problem perfectly. I'm also facing the problem daily, I was just lazy to look into it :).

The issue was created by FileSystem rework of Alex (which was an awesome step forward) from last year I think. The item list is differently updated since - changed item is added and removed in model. This was done differently before so it did not trigger the makeItemVisible calls.

Anyway the use-case is simpler. You have long enough item list so you can scroll. Focus an item and scroll so that the focused item is outside the viewport. Currently you are not able to do that if any of the items is constantly updating (e.g. when a file download is in progress).

nmel added a comment.Mar 27 2018, 5:24 AM

We are talking about the same issue and I also experience it from time to time. I was replying to this:

I don't know about a use-case that might be broken by this change.

as I found the change that's introduced the lines you want to remove. As the lines were added as a response to a bug, I was interested what was the problem. Although, 9 years has passed, it might be not relevant anymore.

The code change seems fine. I'll try to test this patch in the next few days.

I found the change that's introduced the lines you want to remove. As the lines were added as a response to a bug, I was interested what was the problem.

Sorry, my bad, I understand now! Unfortunately I also don't know how to find the antient bug reports.

One of the use cases I can imagine is copy small files to the folder so that new items appear before current item - so the current item will be pushed down and become invisible quickly. Just an idea, I haven't tested it yet.

This one I just tested and current item kept being visible (view was appropriately scrolled).

I still have the issue if the currently updating item is focused. But that can also be a feature for somebody, I'm not sure. Anyway this diff seems to me as an improvement over current situation. That is if we don't find any other issues of course :).

nmel added a comment.Mar 28 2018, 7:06 AM

I still have the issue if the currently updating item is focused. But that can also be a feature for somebody, I'm not sure. Anyway this diff seems to me as an improvement over current situation. That is if we don't find any other issues of course :).

Thanks for mentioning. I'll try to pay attention to this during testing.

nmel requested changes to this revision.Mar 29 2018, 7:11 AM

Updating a single file works fine. When adding files, I still repro the issue (can't scroll with mouse) + current item position on screen is pushed down (current item is still correct). Check out the code below (run in the test directory with many other files):

for ((i = 0; i < 1000; i++)); do touch aaa$i; sleep 1; done
This revision now requires changes to proceed.Mar 29 2018, 7:11 AM
nmel added a comment.Mar 29 2018, 7:16 AM

I also confirm the issue when current item is being updated. Can't scroll with mouse either. Interestingly, it's also the case when the very next to the item, which is being updated, is current - also can't scroll.

martinkostolny abandoned this revision.Apr 1 2018, 9:28 PM

Nikita, thanks for review and testing! However I'm abandoning this diff because Alex wrote a more comprehensive patch for the problem. So we can discuss there: D11840