Fixes build issues following the merge

feature/top10
Laurent 7 years ago
parent 3984357077
commit dec90dab29
  1. 10
      app/src/main/java/net/pokeranalytics/android/model/migrations/Patcher.kt
  2. 6
      app/src/main/java/net/pokeranalytics/android/ui/fragment/report/ProgressReportFragment.kt

@ -41,16 +41,6 @@ class Patcher {
} }
} }
if (!Preferences.getBoolean(Preferences.DBPatch.LONE_COMPUTABLE_RESULTS, context)) {
// patch for https://console.firebase.google.com/project/poker-analytics-97998/crashlytics/app/android:net.pokeranalytics.android/issues/5cd2c884f8b88c29635caa16
val loneComputableResults = realm.where(ComputableResult::class.java).isNull("session").findAll()
realm.executeTransaction {
loneComputableResults.deleteAllFromRealm()
}
Preferences.setBoolean(Preferences.DBPatch.LONE_COMPUTABLE_RESULTS, true, context)
}
realm.close() realm.close()
} }

@ -87,9 +87,7 @@ class ProgressReportFragment : AbstractReportFragment() {
fragmentTransaction?.add(R.id.graphContainer, graphFragment) fragmentTransaction?.add(R.id.graphContainer, graphFragment)
fragmentTransaction?.commit() fragmentTransaction?.commit()
this.aggregationTypes = stat.aggregationTypes stat.aggregationTypes.firstOrNull()?.let { aggregationType ->
this.aggregationTypes.firstOrNull()?.let { aggregationType ->
reports[aggregationType]?.let { report -> reports[aggregationType]?.let { report ->
setGraphData(report, aggregationType) setGraphData(report, aggregationType)
} }
@ -97,7 +95,7 @@ class ProgressReportFragment : AbstractReportFragment() {
val aggregationTypes = stat.aggregationTypes val aggregationTypes = stat.aggregationTypes
this.aggregationTypes.forEachIndexed { index, type -> aggregationTypes.forEachIndexed { index, type ->
val chip = Chip(requireContext()) val chip = Chip(requireContext())
chip.id = index chip.id = index
chip.text = requireContext().getString(type.resId) chip.text = requireContext().getString(type.resId)

Loading…
Cancel
Save