mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	refactor: update SettingsActivity to not use custom appCompatDeletegate
It is required because that delegate is automatically handled in new libraries.
This commit is contained in:
		
							parent
							
								
									e21796938e
								
							
						
					
					
						commit
						db3f0f2505
					
				
					 2 changed files with 8 additions and 8 deletions
				
			
		|  | @ -15,7 +15,7 @@ import fr.free.nrw.commons.theme.BaseActivity; | |||
| public class SettingsActivity extends BaseActivity { | ||||
| 
 | ||||
|     private ActivitySettingsBinding binding; | ||||
|     private AppCompatDelegate settingsDelegate; | ||||
| //    private AppCompatDelegate settingsDelegate; | ||||
|     /** | ||||
|      * to be called when the activity starts | ||||
|      * @param savedInstanceState the previously saved state | ||||
|  | @ -39,10 +39,10 @@ public class SettingsActivity extends BaseActivity { | |||
|     @Override | ||||
|     protected void onPostCreate(Bundle savedInstanceState) { | ||||
|         super.onPostCreate(savedInstanceState); | ||||
|         if (settingsDelegate == null) { | ||||
|             settingsDelegate = AppCompatDelegate.create(this, null); | ||||
|         } | ||||
|         settingsDelegate.onPostCreate(savedInstanceState); | ||||
| //        if (settingsDelegate == null) { | ||||
| //            settingsDelegate = AppCompatDelegate.create(this, null); | ||||
| //        } | ||||
| //        settingsDelegate.onPostCreate(savedInstanceState); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ import com.nhaarman.mockitokotlin2.whenever | |||
| import fr.free.nrw.commons.kvstore.JsonKvStore | ||||
| import fr.free.nrw.commons.upload.UploadResult | ||||
| import fr.free.nrw.commons.upload.WikidataPlace | ||||
| import fr.free.nrw.commons.wikidata.model.RemoveClaim | ||||
| import io.reactivex.Observable | ||||
| import org.junit.Before | ||||
| import org.junit.Test | ||||
|  | @ -18,8 +19,6 @@ import org.mockito.Mock | |||
| import org.mockito.Mockito | ||||
| import org.mockito.Mockito.verifyNoInteractions | ||||
| import org.mockito.MockitoAnnotations | ||||
| import fr.free.nrw.commons.wikidata.model.EditClaim | ||||
| import fr.free.nrw.commons.wikidata.model.RemoveClaim | ||||
| 
 | ||||
| class WikidataEditServiceTest { | ||||
|     @Mock | ||||
|  | @ -56,7 +55,8 @@ class WikidataEditServiceTest { | |||
|     fun testUpdateDepictsProperty() { | ||||
|         val fileEntityId = "12345" | ||||
| 
 | ||||
|         whenever(wikibaseClient.getClaimIdsByProperty("M" + fileEntityId, "P180")) | ||||
|         whenever(wikibaseClient.getClaimIdsByProperty("M" + fileEntityId, | ||||
|             WikidataProperties.DEPICTS.propertyName)) | ||||
|             .thenReturn(Observable.just(emptyList())) | ||||
|         whenever(wikibaseClient.postDeleteClaims("M" + fileEntityId, | ||||
|             gson.toJson(Mockito.mock(RemoveClaim::class.java))) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rohit Verma
						Rohit Verma