You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
detach(Card) - will remove all listeners for this card
detachAll() - will remove all listeners for all cards altogether
At the moment, there is no way to implement the removal of a specific callback tied to a specific card. The opinion is based on the technical implementation of WatcherImpl.
For what?
It might be worth considering some use cases:
you don't use detacher (perhaps because of its implementation, which is not convenient for all cases) in the attach method and want to delete [all] callbacks yourself later
you don't need to remove callbacks. Your application adds them once and uses them after until you close the application.
This would also require making detacher a nulable-type (but probably still required)
The text was updated successfully, but these errors were encountered:
I see this as introducing two possible methods:
detach(Card)
- will remove all listeners for this carddetachAll()
- will remove all listeners for all cards altogetherAt the moment, there is no way to implement the removal of a specific callback tied to a specific card. The opinion is based on the technical implementation of
WatcherImpl
.For what?
It might be worth considering some use cases:
detacher
(perhaps because of its implementation, which is not convenient for all cases) in theattach
method and want to delete [all] callbacks yourself laterThis would also require making
detacher
a nulable-type (but probably still required)The text was updated successfully, but these errors were encountered: