Skip to content

Conversation

@cypherop
Copy link
Contributor

@cypherop cypherop commented Mar 27, 2019

Description (required)

Fixes #2761

Tests performed (required)

Tested ProdDebug on Motorola Moto G5 plus with API level 24.

ezgif com-video-to-gif(2)

Copy link
Collaborator

@neslihanturan neslihanturan left a comment

Choose a reason for hiding this comment

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

Thanks but this method is not suggested if it is not the only option. The solution with this method https://developer.android.com/guide/topics/resources/runtime-changes#RetainingAnObject is what we need

@codecov-io
Copy link

codecov-io commented Mar 27, 2019

Codecov Report

Merging #2762 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2762      +/-   ##
=========================================
- Coverage    2.83%   2.83%   -0.01%     
=========================================
  Files         268     268              
  Lines       12774   12782       +8     
  Branches     1129    1131       +2     
=========================================
  Hits          362     362              
- Misses      12387   12395       +8     
  Partials       25      25
Impacted Files Coverage Δ
...ava/fr/free/nrw/commons/review/ReviewActivity.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e14a9c1...44fb80c. Read the comment docs.

@cypherop
Copy link
Contributor Author

@neslihanturan So should I create a new ViewModel class and use it for retaining views?

@neslihanturan
Copy link
Collaborator

No it is for carrying large objects. You should use onSaveInstanceState()

@cypherop
Copy link
Contributor Author

@neslihanturan I have done the changes and have updated the PR.

Copy link
Collaborator

@neslihanturan neslihanturan left a comment

Choose a reason for hiding this comment

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

Code seems alright, will merge after tested:)

@neslihanturan
Copy link
Collaborator

This passes from my tests but there is a point I recognized, and want to wait for review from another person too. Since

    @SuppressLint("CheckResult")
    private void updateImage(String fileName) {
...
        this.fileName = fileName;
...
        reviewPager.setCurrentItem(0);

how we don't start from the first question each time?

@neslihanturan
Copy link
Collaborator

Hi @Sp2710 , closing this one since the Review Activity implementation is changed since then and a suitable solution is available. Thanks for your contribution.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Peer Review loads different image on rotation

3 participants