-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix opening federated shares #50292
base: master
Are you sure you want to change the base?
Fix opening federated shares #50292
Conversation
Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
24a89e5
to
e485f58
Compare
@@ -296,7 +296,8 @@ export default defineComponent({ | |||
|
|||
// Check if the content is smaller than the viewport, meaning no scrollbar | |||
const targetRow = Math.ceil(this.dataSources.length / this.columnCount) | |||
if (targetRow < this.rowCount) { | |||
// The offset is needed to avoid some items not being visible but also not being scrolled to. | |||
if (targetRow < this.rowCount - 8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure it is not this? (8 is such a magic number)
if (targetRow < this.rowCount - 8) { | |
if (targetRow < (this.rowCount - ((this.bufferItems / this.columnCount) * 2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I hate this magic number. I just checked which value fits and 8 is the one. I'm not sure on what it is based, but I can try your calculation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's 6 in list mode, but that doesn't work if the item is just one off screen. 8 is the minimum value that works here.
I noticed the viewer still fails to open when you do the process multiple times in a row. The first time works with this PR, but the subsequent attempts still fail. |
Summary
Opening a federated share is currently broken, as the scroll does not work for items that are in a certain area outside the viewport and the viewer is not triggered because the permissions are wrong.
I tested this on stable30 and stable29 as well and those have the same bug and the fixes also work there.
Checklist