mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 11:26:01 +03:00
Code review fixes.
This commit is contained in:
parent
79afdf724f
commit
7285bc6889
1 changed files with 5 additions and 9 deletions
|
@ -93,19 +93,15 @@ class LocationTracker @Inject constructor(
|
|||
}
|
||||
|
||||
fun addCallback(callback: Callback) {
|
||||
synchronized(callbacks) {
|
||||
if (!callbacks.contains(callback)) {
|
||||
callbacks.add(callback)
|
||||
}
|
||||
if (!callbacks.contains(callback)) {
|
||||
callbacks.add(callback)
|
||||
}
|
||||
}
|
||||
|
||||
fun removeCallback(callback: Callback) {
|
||||
synchronized(callbacks) {
|
||||
callbacks.remove(callback)
|
||||
if (callbacks.size == 0) {
|
||||
stop()
|
||||
}
|
||||
callbacks.remove(callback)
|
||||
if (callbacks.size == 0) {
|
||||
stop()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue