Skip to content

Commit 54c7187

Browse files
Peer Review Fix (commons-app#5435)
* Peer Review Fix * Peer Review Fix commons-app#2 --------- Co-authored-by: shashankkumar <[email protected]>
1 parent a16d9f7 commit 54c7187

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/src/main/java/fr/free/nrw/commons/review/ReviewActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.viewpagerindicator.CirclePageIndicator;
2828
import fr.free.nrw.commons.Media;
2929
import fr.free.nrw.commons.R;
30+
import fr.free.nrw.commons.auth.AccountUtil;
3031
import fr.free.nrw.commons.delete.DeleteHelper;
3132
import fr.free.nrw.commons.media.MediaDetailFragment;
3233
import fr.free.nrw.commons.theme.BaseActivity;
@@ -217,6 +218,12 @@ private void updateImage(Media media) {
217218
return;
218219
}
219220

221+
//If The Media User and Current Session Username is same then Skip the Image
222+
if (media.getUser() != null && media.getUser().equals(AccountUtil.getUserName(getApplicationContext()))) {
223+
runRandomizer();
224+
return;
225+
}
226+
220227
simpleDraweeView.setImageURI(media.getImageUrl());
221228

222229
reviewController.onImageRefreshed(media); //file name is updated

app/src/main/java/fr/free/nrw/commons/review/ReviewImageFragment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
2222
import java.util.ArrayList;
2323
import java.util.List;
24+
import java.util.Objects;
2425

2526
public class ReviewImageFragment extends CommonsDaggerSupportFragment {
2627

@@ -91,6 +92,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
9192
ButterKnife.bind(this, layoutView);
9293

9394
String question, explanation=null, yesButtonText, noButtonText;
95+
9496
switch (position) {
9597
case SPAM:
9698
question = getString(R.string.review_spam);

0 commit comments

Comments
 (0)