mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	.kt: resolved backing-property-naming error in ktLint, made matching properties public, matched names and refactored
This commit is contained in:
		
							parent
							
								
									131dd93e4b
								
							
						
					
					
						commit
						9dce6831b6
					
				
					 7 changed files with 7 additions and 7 deletions
				
			
		|  | @ -28,7 +28,7 @@ class FolderFragment : CommonsDaggerSupportFragment() { | ||||||
|      * ViewBinding |      * ViewBinding | ||||||
|      */ |      */ | ||||||
|     private var _binding: FragmentCustomSelectorBinding? = null |     private var _binding: FragmentCustomSelectorBinding? = null | ||||||
|     private val binding get() = _binding |     val binding get() = _binding | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * View Model for images. |      * View Model for images. | ||||||
|  |  | ||||||
|  | @ -49,7 +49,7 @@ class ImageFragment : | ||||||
|     RefreshUIListener, |     RefreshUIListener, | ||||||
|     PassDataListener { |     PassDataListener { | ||||||
|     private var _binding: FragmentCustomSelectorBinding? = null |     private var _binding: FragmentCustomSelectorBinding? = null | ||||||
|     private val binding get() = _binding |     val binding get() = _binding | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * Current bucketId. |      * Current bucketId. | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ abstract class BasePagingPresenter<T>( | ||||||
|             pageableBaseDataSource.loadingStates |             pageableBaseDataSource.loadingStates | ||||||
|                 .observeOn(mainThreadScheduler) |                 .observeOn(mainThreadScheduler) | ||||||
|                 .subscribe(::onLoadingState, Timber::e), |                 .subscribe(::onLoadingState, Timber::e), | ||||||
|             pageableBaseDataSource.noItemsLoadedQueries.subscribe(view::showEmptyText), |             pageableBaseDataSource.noItemsLoadedEvent.subscribe(view::showEmptyText), | ||||||
|         ) |         ) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ abstract class PageableBaseDataSource<T>( | ||||||
|     private val _pagingResults = PublishProcessor.create<LiveData<PagedList<T>>>() |     private val _pagingResults = PublishProcessor.create<LiveData<PagedList<T>>>() | ||||||
|     val pagingResults: Flowable<LiveData<PagedList<T>>> = _pagingResults |     val pagingResults: Flowable<LiveData<PagedList<T>>> = _pagingResults | ||||||
|     private val _noItemsLoadedEvent = PublishProcessor.create<String>() |     private val _noItemsLoadedEvent = PublishProcessor.create<String>() | ||||||
|     val noItemsLoadedQueries: Flowable<String> = _noItemsLoadedEvent |     val noItemsLoadedEvent: Flowable<String> = _noItemsLoadedEvent | ||||||
|     private var currentFactory: PagingDataSourceFactory<T>? = null |     private var currentFactory: PagingDataSourceFactory<T>? = null | ||||||
| 
 | 
 | ||||||
|     abstract val loadFunction: LoadFunction<T> |     abstract val loadFunction: LoadFunction<T> | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ import fr.free.nrw.commons.databinding.FragmentAdvanceQueryBinding | ||||||
| 
 | 
 | ||||||
| class AdvanceQueryFragment : Fragment() { | class AdvanceQueryFragment : Fragment() { | ||||||
|     private var _binding: FragmentAdvanceQueryBinding? = null |     private var _binding: FragmentAdvanceQueryBinding? = null | ||||||
|     private val binding get() = _binding |     val binding get() = _binding | ||||||
| 
 | 
 | ||||||
|     lateinit var callback: Callback |     lateinit var callback: Callback | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -48,7 +48,7 @@ class BasePagingPresenterTest { | ||||||
|         MockitoAnnotations.openMocks(this) |         MockitoAnnotations.openMocks(this) | ||||||
|         whenever(pageableBaseDataSource.pagingResults).thenReturn(searchResults) |         whenever(pageableBaseDataSource.pagingResults).thenReturn(searchResults) | ||||||
|         whenever(pageableBaseDataSource.loadingStates).thenReturn(loadingStates) |         whenever(pageableBaseDataSource.loadingStates).thenReturn(loadingStates) | ||||||
|         whenever(pageableBaseDataSource.noItemsLoadedQueries) |         whenever(pageableBaseDataSource.noItemsLoadedEvent) | ||||||
|             .thenReturn(noItemLoadedQueries) |             .thenReturn(noItemLoadedQueries) | ||||||
|         testScheduler = TestScheduler() |         testScheduler = TestScheduler() | ||||||
|         basePagingPresenter = |         basePagingPresenter = | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ class PageableBaseDataSourceTest { | ||||||
|     fun `onQueryUpdated invokes livedatconverter with no items emitter`() { |     fun `onQueryUpdated invokes livedatconverter with no items emitter`() { | ||||||
|         val (zeroItemsFuncCaptor, _) = expectNewLiveData() |         val (zeroItemsFuncCaptor, _) = expectNewLiveData() | ||||||
|         pageableBaseDataSource.onQueryUpdated("test") |         pageableBaseDataSource.onQueryUpdated("test") | ||||||
|         pageableBaseDataSource.noItemsLoadedQueries |         pageableBaseDataSource.noItemsLoadedEvent | ||||||
|             .test() |             .test() | ||||||
|             .also { zeroItemsFuncCaptor.firstValue.invoke() } |             .also { zeroItemsFuncCaptor.firstValue.invoke() } | ||||||
|             .assertValue("test") |             .assertValue("test") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tristan81
						tristan81