mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fix code quality issues (#2359)
* Minor changes * Fix more errors * Revert change * Minor error fix * Remove unused import * Merge branch 'master' of github.com:commons-app/apps-android-commons into lint-errors # Conflicts: # app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java * Minor changes * Undo changes * Undo performclick
This commit is contained in:
parent
9882d24651
commit
01a7526477
6 changed files with 11 additions and 9 deletions
|
|
@ -29,6 +29,7 @@ import android.widget.TextView;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
|
@ -62,7 +63,6 @@ import static fr.free.nrw.commons.auth.AccountUtil.AUTH_TOKEN_TYPE;
|
|||
|
||||
public class LoginActivity extends AccountAuthenticatorActivity {
|
||||
|
||||
public static final String PARAM_USERNAME = "fr.free.nrw.commons.login.username";
|
||||
private static final String FEATURED_IMAGES_CATEGORY = "Category:Featured_pictures_on_Wikimedia_Commons";
|
||||
|
||||
@Inject MediaWikiApi mwApi;
|
||||
|
|
@ -387,10 +387,10 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
super.onRestoreInstanceState(savedInstanceState);
|
||||
loginCurrentlyInProgress = savedInstanceState.getBoolean(LOGGING_IN, false);
|
||||
errorMessageShown = savedInstanceState.getBoolean(ERROR_MESSAGE_SHOWN, false);
|
||||
if (loginCurrentlyInProgress){
|
||||
if (loginCurrentlyInProgress) {
|
||||
performLogin();
|
||||
}
|
||||
if (errorMessageShown){
|
||||
if (errorMessageShown) {
|
||||
resultantError = savedInstanceState.getString(RESULTANT_ERROR);
|
||||
handleOtherResults(resultantError);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import android.widget.TextView;
|
|||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class DeleteTask extends AsyncTask<Void, Integer, Boolean> {
|
|||
@Inject MediaWikiApi mwApi;
|
||||
@Inject SessionManager sessionManager;
|
||||
|
||||
public static final int NOTIFICATION_DELETE = 1;
|
||||
private static final int NOTIFICATION_DELETE = 1;
|
||||
|
||||
private NotificationManager notificationManager;
|
||||
private Builder notificationBuilder;
|
||||
|
|
@ -113,11 +113,11 @@ public class DeleteTask extends AsyncTask<Void, Integer, Boolean> {
|
|||
publishProgress(4);
|
||||
|
||||
mwApi.appendEdit(editToken,userPageString+"\n",
|
||||
"User_Talk:"+sessionManager.getCurrentAccount().name,summary);
|
||||
"User_Talk:"+ sessionManager.getCurrentAccount().name,summary);
|
||||
publishProgress(5);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Timber.d(e.getMessage());
|
||||
Timber.e(e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -160,7 +160,7 @@ public class DeleteTask extends AsyncTask<Void, Integer, Boolean> {
|
|||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result) {
|
||||
String message = "";
|
||||
String message;
|
||||
String title = "Nominating for Deletion";
|
||||
|
||||
if (result){
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/achievements_revert_limit_message"
|
||||
android:textSize="10dp"
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/images_revert_limit_text"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/result"
|
||||
style="?android:textAppearanceLarge"
|
||||
android:textSize="32dp"
|
||||
android:textSize="32sp"
|
||||
android:layout_marginTop="@dimen/activity_margin_vertical" />
|
||||
|
||||
<com.dinuscxj.progressbar.CircleProgressBar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue