Enhancing favorites

feature/top10
Laurent 7 years ago
parent de66ddcb01
commit 4010617bcb
  1. 2
      app/src/main/java/net/pokeranalytics/android/model/utils/FavoriteSessionFinder.kt

@ -102,7 +102,7 @@ class FavoriteSessionFinder {
*/
fun favoriteSession(sessionType: Int, location: Location?, realm: Realm, context: Context): Session? {
val lastSessionsQuery = realm.where(Session::class.java).isNotNull("endDate").equalTo("type", sessionType)
val lastSessionsQuery = realm.where(Session::class.java).isNotNull("startDate").equalTo("type", sessionType)
if (location != null) {
lastSessionsQuery.equalTo("location.id", location.id)
}

Loading…
Cancel
Save