Fixed bug where deleted items didn't disappear from list

This commit is contained in:
Christian Basler 2018-01-16 17:34:42 +01:00
parent df581f4c51
commit 30d9d72133

View File

@ -45,9 +45,7 @@ import java.lang.ref.WeakReference
* Provides singleton objects across the application. * Provides singleton objects across the application.
*/ */
object Singleton { object Singleton {
var currentLabel = Observable<Label?>(null).apply { var currentLabel = Observable<Label?>(null)
addObserver(this) { _ -> swipeableMessageAdapter = null }
}
private var swipeableMessageAdapter: WeakReference<SwipeableMessageAdapter>? = null private var swipeableMessageAdapter: WeakReference<SwipeableMessageAdapter>? = null
val labeler = DefaultLabeler().apply { val labeler = DefaultLabeler().apply {