Removes warnings

hh
Laurent 6 years ago
parent fca74a3d5e
commit 50bbdffc8d
  1. 7
      app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt
  2. 12
      app/src/main/java/net/pokeranalytics/android/ui/adapter/ReportPagerAdapter.kt
  3. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/filter/FiltersFragment.kt

@ -169,14 +169,13 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable,
this.session = handSetup.session
this.date = this.session?.handHistoryAutomaticDate ?: Date()
this.createActions(handSetup.straddlePositions)
this.createActions()
}
/***
* Creates the initial actions of the hand history using the number of players,
* and the optional [straddlePositions]
* Creates the initial actions of the hand history
*/
private fun createActions(straddlePositions: List<Position>) {
private fun createActions() {
this.actions.clear()

@ -14,17 +14,13 @@ import net.pokeranalytics.android.ui.viewmodel.ReportHolder
* Home Adapter
*/
class ReportPagerAdapter(private val context: Context,
val fragmentManager: FragmentManager,
private val reportHolder: ReportHolder) : FragmentPagerAdapter(fragmentManager) {
fragmentManager: FragmentManager,
private val reportHolder: ReportHolder) : FragmentPagerAdapter(fragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
override fun getItem(position: Int): BaseFragment {
return when (position) {
0 -> {
GraphFragment.newInstance(style = GraphFragment.Style.BAR)
}
1 -> {
GraphFragment.newInstance(style = GraphFragment.Style.MULTILINE)
}
0 -> GraphFragment.newInstance(style = GraphFragment.Style.BAR)
1 -> GraphFragment.newInstance(style = GraphFragment.Style.MULTILINE)
2 -> {
val report = this.reportHolder.report
ComposableTableReportFragment.newInstance(report)

@ -150,7 +150,7 @@ open class FiltersFragment : RealmFragment(), RowRepresentableDelegate {
super.onRowSelected(position, row, tag)
this.model.selectedCategoryRow = row
this.model.currentFilter?.id?.let { filterId ->
this.model.currentFilter?.id?.let { _ ->
(activity as FiltersActivity).showDetailsFragment()

Loading…
Cancel
Save