Skip to content
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

[stable12] Fix empty details view after renaming a file #7792

Conversation

danxuliu
Copy link
Member

Backport of #7783

All the tests in the "Renaming files" section added the test files,
although those calling "doRename()" added them by setting a path for the
file too. However, the path is ignored in the other tests, so adding the
files can be unified and moved to "beforeEach()".

This would be needed, for example, to show the details view for a file
before calling "doRename()".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"FileList._updateDetailsView" expects either a file name (as a string)
or a file model (as an "OCA.File.FileInfoModel"), but when called
through "updateInList" an "OC.Files.FileInfo" object was given instead.
As the given attribute was not a model "_updateDetailsView" treated it
as a file name and tried to get the model for that file, which failed
and caused the details view to be emptied.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works 👍

@MorrisJobke MorrisJobke merged commit 2fa5466 into stable12 Jan 11, 2018
@MorrisJobke MorrisJobke deleted the stable12-7783-fix-empty-details-view-after-renaming-a-file branch January 11, 2018 14:07
@codecov
Copy link

codecov bot commented Jan 11, 2018

Codecov Report

Merging #7792 into stable12 will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             stable12    #7792   +/-   ##
===========================================
  Coverage       53.84%   53.84%           
  Complexity      22758    22758           
===========================================
  Files            1385     1385           
  Lines           87148    87148           
  Branches         1331     1331           
===========================================
  Hits            46926    46926           
  Misses          40222    40222

@MorrisJobke MorrisJobke mentioned this pull request Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants