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

[stable13] Do not keep FileInfoModels returned by "getModelForFile" #89

Merged
merged 1 commit into from Feb 17, 2018

Conversation

Projects
None yet
2 participants
@danxuliu
Member

danxuliu commented Feb 14, 2018

Backport of #88

Do not keep FileInfoModels returned by "getModelForFile"
FileInfoModels returned by "getModelForFile" are just temporary, and
they should be used and forgotten instead of being kept by apps. It is
not guaranteed that different calls to "getModelForFile" for the same
file returns the same FileInfoModel object, so changes in one model
instance could be not known by other model instances (and their views),
and this could lead to different bugs (for example, a file list entry
being duplicated when a text file is edited or favourited after being
created).

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

@danxuliu danxuliu added this to the Nextcloud 13.0.1 milestone Feb 14, 2018

@danxuliu danxuliu requested review from rullzer, MorrisJobke and icewind1991 Feb 14, 2018

@rullzer rullzer merged commit 21ddb80 into stable13 Feb 17, 2018

3 checks passed

continuous-integration/drone/pr the build was successful
Details
continuous-integration/drone/push the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rullzer rullzer deleted the stable13-88-do-not-keep-fileinfomodels-returned-by-getmodelforfile branch Feb 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment