Convert the ExploreMapFragment to kotlin

This commit is contained in:
Paul Hawke 2025-08-01 16:26:04 -05:00
parent cd1aaa82e0
commit 4dd1e3ee2e
3 changed files with 1093 additions and 1152 deletions

View file

@ -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