Skip to content

Provide a way to remove listeners #48

@Grohden

Description

@Grohden

I could not find any method in the beta that provides a way to remove a listener.. i have something like this:

RequestAllTasksListener { hadErrors ->
      if (hadErrors) {
        cancel(true)
      } else {
        download()
      }
    }.also {
      WendyConfig.addTaskRunnerListener(it)
      Wendy.shared.runTasks(null)
    }

And every time i need to call the function with this piece of code a listener is added.. one could say that i should only put a listener one single time, but for our needs this is not true, we need to listen to events, see if there's anything wrong and 'unsubscribe' after that..

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions