-
-
Couldn't load subscription status.
- Fork 4.6k
fix(files_sharing): sharing status action sidebar promise return #54410
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(files_sharing): sharing status action sidebar promise return #54410
Conversation
|
@susnux I wonder why my linter haven't caught this 🤔 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
35792c9 to
4437aad
Compare
|
Resolved, this should be better. |
f284f57 to
2a14928
Compare
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2a14928 to
1b2d81a
Compare
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1b2d81a to
ce41a2d
Compare
|
/compile |
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.
ℹ️ Needs to be added to the release script
| if ((node.permissions & Permission.READ) !== 0) { | ||
| window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing') | ||
| return sidebarAction.exec(node, view, dir) | ||
| sidebarAction.exec(node, view, dir) |
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.
IMHO its better to await it here so that we can trust all work is done and not pending branches exist
| sidebarAction.exec(node, view, dir) | |
| await sidebarAction.exec(node, view, dir) |
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 thought about it, I kinda thought I would be confortable awaiting for the sidebar when we'll have it properly re-written with the right api and Node usage 🙈
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
/backport 9404059 to stable31 |
|
/backport 9404059 to stable30 |
|
/backport 9404059 to stable29 |
Summary
The sidebar action is returning a promise, we should await so our own exec also returns the proper value.
This fixes some edge case where opening the sharing options leave the loading indicator spinning
Checklist