Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

observers must be declared as set #3

Closed
RubberBigPepper opened this issue Jan 30, 2022 · 1 comment
Closed

observers must be declared as set #3

RubberBigPepper opened this issue Jan 30, 2022 · 1 comment

Comments

@RubberBigPepper
Copy link

private val observers = mutableListOf() // in this line use of mutableSetOf is needed

override fun observe(observer: Observer) {
observers.add(observer)//'cause you can add same observer many times
}

@DmitryTsyvtsyn
Copy link
Owner

Thank's) It's OK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants