Enable live track for current user
This commit is contained in:
parent
13a30fb20f
commit
7e88cf711d
1 changed files with 7 additions and 9 deletions
|
@ -156,14 +156,12 @@ class UserGpxInfoFragment : BaseDialogFragment() {
|
|||
updateDateAndTimeButton()
|
||||
|
||||
liveBtn = mainView.findViewById<TextView>(R.id.live_btn).apply {
|
||||
if (userId != telegramHelper.getCurrentUserId()) {
|
||||
setOnClickListener {
|
||||
val enabled = !liveTrackEnabled()
|
||||
settings.updateLiveTrack(userId, chatId, deviceName, enabled)
|
||||
updateLiveTrackBtn()
|
||||
if (enabled) {
|
||||
startHandler()
|
||||
}
|
||||
setOnClickListener {
|
||||
val enabled = !liveTrackEnabled()
|
||||
settings.updateLiveTrack(userId, chatId, deviceName, enabled)
|
||||
updateLiveTrackBtn()
|
||||
if (enabled) {
|
||||
startHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -510,4 +508,4 @@ class UserGpxInfoFragment : BaseDialogFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue