remove warnings

feature/top10
Laurent 7 years ago
parent 94e907d3e9
commit 3cf3cf8b8e
  1. 4
      app/src/main/java/net/pokeranalytics/android/PokerAnalyticsApplication.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/ui/fragment/StatsFragment.kt

@ -46,13 +46,13 @@ class PokerAnalyticsApplication : Application() {
val realm: Realm = Realm.getDefaultInstance() val realm: Realm = Realm.getDefaultInstance()
// Add observer on session time frame changes // Add observer on session time frame changes
this.sessions = realm.where(Session::class.java).findAll() // monitor session deletions this.sessions = realm.where(Session::class.java).findAll() // monitor session deletions
this.sessions?.addChangeListener { _, changeSet -> // this.sessions?.addChangeListener { _, changeSet ->
/* /*
val deletedSessions = val deletedSessions =
realm.where(Session::class.java).`in`("id", changeSet.deletions.toTypedArray()).findAll() realm.where(Session::class.java).`in`("id", changeSet.deletions.toTypedArray()).findAll()
deletedSessions.forEach { it.cleanup() } deletedSessions.forEach { it.cleanup() }
*/ */
} // }
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
// Logs // Logs

@ -5,7 +5,6 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.realm.Realm
import kotlinx.android.synthetic.main.fragment_stats.* import kotlinx.android.synthetic.main.fragment_stats.*
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
@ -101,7 +100,6 @@ class StatsFragment : SessionObserverFragment(), StaticRowRepresentableDataSourc
runBlocking { runBlocking {
val realm = Realm.getDefaultInstance()
val cgSessions = mutableListOf<Session>() val cgSessions = mutableListOf<Session>()
val tSessions = mutableListOf<Session>() val tSessions = mutableListOf<Session>()

Loading…
Cancel
Save