mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
try to add username and filename
This commit is contained in:
parent
82a6a1a686
commit
1183476bca
4 changed files with 15 additions and 15 deletions
|
|
@ -149,6 +149,14 @@ public class ReviewActivity extends AuthenticatedActivity {
|
|||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(this::updateCategories, this::categoryFetchError);
|
||||
|
||||
mwApi.firstRevisionOfFile("File:" + fileName).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(revision -> {
|
||||
ReviewController.firstRevision = revision;
|
||||
((ReviewImageFragment)reviewPagerAdapter.getItem(reviewPager.getCurrentItem())).updateImageCaption();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void categoryFetchError(Throwable throwable) {
|
||||
|
|
|
|||
|
|
@ -33,12 +33,6 @@ public class ReviewController {
|
|||
public void onImageRefreshed(String fileName) {
|
||||
ReviewController.fileName = fileName;
|
||||
ReviewController.categories = new ArrayList<>();
|
||||
|
||||
reviewActivity.mwApi.firstRevisionOfFile("File:" + fileName).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(revision -> {
|
||||
ReviewController.firstRevision = revision;
|
||||
});
|
||||
}
|
||||
|
||||
public void onCategoriesRefreshed(ArrayList<String> categories) {
|
||||
|
|
|
|||
|
|
@ -1,27 +1,20 @@
|
|||
package fr.free.nrw.commons.review;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||
import fr.free.nrw.commons.utils.ViewUtil;
|
||||
|
||||
/**
|
||||
* Created by root on 19.05.2018.
|
||||
|
|
@ -39,6 +32,7 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
|||
private String catString;
|
||||
|
||||
private View textViewQuestionContext;
|
||||
private View imageCaption;
|
||||
private View textViewQuestion;
|
||||
private SimpleDraweeView simpleDraweeView;
|
||||
|
||||
|
|
@ -85,6 +79,7 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
|||
progressBar = layoutView.findViewById(R.id.progressBar);
|
||||
textViewQuestion = layoutView.findViewById(R.id.reviewQuestion);
|
||||
textViewQuestionContext = layoutView.findViewById(R.id.reviewQuestionContext);
|
||||
imageCaption = layoutView.findViewById(R.id.imageCaption);
|
||||
yesButton = layoutView.findViewById(R.id.yesButton);
|
||||
noButton = layoutView.findViewById(R.id.noButton);
|
||||
String question, explanation;
|
||||
|
|
@ -138,4 +133,8 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
|||
}
|
||||
return layoutView;
|
||||
}
|
||||
|
||||
public void updateImageCaption() {
|
||||
((TextView)imageCaption).setText(fileName+" is uploaded by: "+ReviewController.firstRevision.username);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,9 @@
|
|||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploadTitle"
|
||||
android:id="@+id/imageCaption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Testingg"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceMedium"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue