class ElementRemoveEvent<E>(
val element: E,
override val collection: ObservableCollection<E>
) : Event<E>
And it is misbehaving as you can see in the screen shots, what is causing this and how do I get rid of it? Is it outcome of excessive type inference?
Animesh Sahu
09/24/2020, 2:48 PM
I have tried Invalidating Caches and Restart, that doesn't seem to solve this.
t
Tobias Berger
09/24/2020, 2:53 PM
It's hard to say, but from the code snippet i guess that you need to add
@ObservableCollection
behind the
this
in your minus call (better version below)
Tobias Berger
09/24/2020, 2:56 PM
right now you're creating a new collection that contains all elements of backup minus the coroutine scope, which I guess is not what you want. I guess this also messes up the type of your
element
and by that also the
ElementRemoveEvent
generic type
Tobias Berger
09/24/2020, 3:07 PM
after taking a closer look: replace
this
with
backingSource
in the
minus
call
a
Animesh Sahu
09/24/2020, 3:09 PM
Ahh, thanks! Didn't noticed that CoroutineScope was sent as an element to minus.