Fix: user reset for Thanks screen (#5183)

Removed previous if statement. If the app is rotated, the Thanks message will disappear, but the username gets a reset for each new image reviewed.
This commit is contained in:
Manuel Cota 2023-03-23 23:58:59 -07:00 committed by GitHub
parent 4e50e6c76e
commit d1af26c8a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,14 +127,9 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
enableButtons();
question = getString(R.string.review_thanks);
// Get existing user name if it is already saved using savedInstanceState else get from reviewController
if (savedInstanceState == null) {
if (getReviewActivity().reviewController.firstRevision != null) {
user = getReviewActivity().reviewController.firstRevision.getUser();
}
} else {
user = savedInstanceState.getString(SAVED_USER);
}
//if the user is null because of whatsoever reason, review will not be sent anyways
if (!TextUtils.isEmpty(user)) {