stream-chat-android icon indicating copy to clipboard operation
stream-chat-android copied to clipboard

Redefine Plugin Interface

Open JcMinarro opened this issue 3 years ago • 0 comments

Plugin interface doesn't apport any value to our SDK, it only asks you to set a name that is not used. On the other hand, the instance of Plugin are used by a code similar to:

val relevantPlugins: List<QueryMembersListener> = plugins.filterIsInstance<QueryMembersListener>()

It is used on that way because "we know" the implementations of Plugin we provide already implement QueryMembersListener interface.

Instead of that, we should include the relevant fun to the Plugin interface and we don't need to filter by checking if implementing a different interface.

JcMinarro avatar Jul 19 '22 16:07 JcMinarro