mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +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){ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ronak Lakhotia
						Ronak Lakhotia