mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Convert the ExploreMapFragment to kotlin
This commit is contained in:
parent
cd1aaa82e0
commit
4dd1e3ee2e
3 changed files with 1093 additions and 1152 deletions
|
|
@ -123,12 +123,7 @@ class ExploreMapRootFragment : CommonsDaggerSupportFragment, MediaDetailProvider
|
|||
* index of viewPager.
|
||||
* @return Media Object
|
||||
*/
|
||||
override fun getMediaAtPosition(i: Int): Media? =
|
||||
if (mapFragment != null && mapFragment!!.mediaList != null) {
|
||||
mapFragment!!.mediaList[i]
|
||||
} else {
|
||||
null
|
||||
}
|
||||
override fun getMediaAtPosition(i: Int): Media? = mapFragment?.mediaList?.get(i)
|
||||
|
||||
/**
|
||||
* This method is called on from getCount of MediaDetailPagerFragment The viewpager will contain
|
||||
|
|
@ -136,12 +131,7 @@ class ExploreMapRootFragment : CommonsDaggerSupportFragment, MediaDetailProvider
|
|||
*
|
||||
* @return Total Media count in the adapter
|
||||
*/
|
||||
override fun getTotalMediaCount(): Int =
|
||||
if (mapFragment != null && mapFragment!!.mediaList != null) {
|
||||
mapFragment!!.mediaList.size
|
||||
} else {
|
||||
0
|
||||
}
|
||||
override fun getTotalMediaCount(): Int = mapFragment?.mediaList?.size ?: 0
|
||||
|
||||
override fun getContributionStateAt(position: Int): Int? = null
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue