|
|
|
@ -32,15 +32,15 @@ object SessionSetManager { |
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
|
|
|
|
|
|
|
|
this.sessions = realm.where(Session::class.java).findAllAsync() |
|
|
|
this.sessions = realm.where(Session::class.java).findAllAsync() |
|
|
|
// this.sessions.addChangeListener { _, _ -> |
|
|
|
this.sessions.addChangeListener { _, _ -> |
|
|
|
//// if (Global.LAUNCH_ASYNC_LISTENERS) { |
|
|
|
// if (Global.LAUNCH_ASYNC_LISTENERS) { |
|
|
|
// if (this.sessionIdsToProcess.isNotEmpty()) { |
|
|
|
if (this.sessionIdsToProcess.isNotEmpty()) { |
|
|
|
// realm.executeTransactionAsync { asyncRealm -> |
|
|
|
realm.executeTransactionAsync { asyncRealm -> |
|
|
|
// processSessions(asyncRealm) |
|
|
|
processSessions(asyncRealm) |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
//// } |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
realm.close() |
|
|
|
realm.close() |
|
|
|
} |
|
|
|
} |
|
|
|
|