Update history sessions

feature/top10
Aurelien Hubert 7 years ago
parent 62108437f6
commit 24fa8e530b
  1. 9
      app/src/main/java/net/pokeranalytics/android/ui/fragment/HistoryFragment.kt

@ -11,7 +11,6 @@ import io.realm.Sort
import io.realm.kotlin.where import io.realm.kotlin.where
import kotlinx.android.synthetic.main.fragment_history.* import kotlinx.android.synthetic.main.fragment_history.*
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.interfaces.Savable import net.pokeranalytics.android.model.interfaces.Savable
@ -118,8 +117,6 @@ class HistoryFragment : PokerAnalyticsFragment(), RowRepresentableDataSource, Ro
GlobalScope.launch { GlobalScope.launch {
delay(100)
val groupedByDay = false val groupedByDay = false
val calendar = Calendar.getInstance() val calendar = Calendar.getInstance()
val currentCalendar = Calendar.getInstance() val currentCalendar = Calendar.getInstance()
@ -163,10 +160,10 @@ class HistoryFragment : PokerAnalyticsFragment(), RowRepresentableDataSource, Ro
} }
override fun viewTypeForPosition(position: Int): Int { override fun viewTypeForPosition(position: Int): Int {
if (rows[position].viewType == RowViewType.HEADER_SESSION.ordinal) { return if (rows[position].viewType == RowViewType.HEADER_SESSION.ordinal) {
return RowViewType.HEADER_SESSION.ordinal RowViewType.HEADER_SESSION.ordinal
} else { } else {
return RowViewType.ROW_SESSION.ordinal RowViewType.ROW_SESSION.ordinal
} }
} }

Loading…
Cancel
Save