[stable30] Fix endless spinner on file entries after triggering an action #54136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a regression introduced in 64cc7af
The fix is not needed in Nextcloud 31 and later, as it was indirectly fixed in 74b2562
When the toast shown while a file is being moved or copied was introduced in 64cc7af an additional condition was added to the
isLoadingcheck of file entries. However, that additional condition caused an endless loading spinner to be shown on file entries of the Shares view (but not in other views) after an action was triggered. Turns out that the condition was not actually needed for the toast, so now it is removed again to solve the endless loading spinner.However, note something strange is going on. If breakpoints are added for
isLoadingand whenloadingis set and reset the loading spinner is gone. The loading spinner is also gone if there are no breakpoints, but instead of changingisLoadingto:it is changed to:
It looks like the problem is related to reactivity and how the computed value is updated... but I do not really know. Therefore this pull request just fixes the regression, but not the underlying issue.
Moreover, fixing the regression also uncovers another issue (which was happening already before the regression was introduced): there is no loading spinner for file entries in the Share views while an action is being executed. However, this also happens in current master, so it is unrelated to this fix and should be addressed in another pull request (but please note that it should be done by someone with good knowledge about Vue and the Files app frontend, so that means it will not be me ;-) ).
How to test
Result with this pull request
The spinner is removed from the checkbox of the file entry
Result without this pull request
An endless spinner is shown on the checkbox of the file entry