Update CalendarFragment

feature/top10
Aurelien Hubert 7 years ago
parent 9c7fb7c359
commit 7b5371a71d
  1. 20
      app/src/main/java/net/pokeranalytics/android/ui/fragment/CalendarFragment.kt

@ -5,20 +5,16 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import io.realm.Realm
import kotlinx.android.synthetic.main.fragment_calendar.*
import kotlinx.android.synthetic.main.fragment_stats.recyclerView
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import net.pokeranalytics.android.R
import net.pokeranalytics.android.calculus.Calculator
import net.pokeranalytics.android.calculus.Stat
import net.pokeranalytics.android.model.comparison.Comparator
import net.pokeranalytics.android.ui.fragment.components.SessionObserverFragment
import net.pokeranalytics.android.ui.view.CalendarTabs
import timber.log.Timber
import kotlin.coroutines.CoroutineContext
@ -88,20 +84,6 @@ class CalendarFragment : SessionObserverFragment(), CoroutineScope {
print(it.computedStat(Stat.NETRESULT)?.value)
}
val comparator = Comparator.MONTH // returns all months
val conditions = comparator.queryConditions
conditions.forEach {
val realm = getRealm()
Calculator.computeStatsWithComparators(realm, conditions = listOf(it), options = Calculator.Options())
}
*/
}
override val coroutineContext: CoroutineContext
@ -110,6 +92,7 @@ class CalendarFragment : SessionObserverFragment(), CoroutineScope {
private fun launchStatComputation() {
/*
val comparator = Comparator.YEAR // returns all months
GlobalScope.launch {
@ -129,6 +112,7 @@ class CalendarFragment : SessionObserverFragment(), CoroutineScope {
}
}
*/
/*
conditions.forEach {

Loading…
Cancel
Save