Enable live track for current user

This commit is contained in:
Vitaliy 2019-08-12 11:25:17 +03:00 committed by GitHub
parent 13a30fb20f
commit 7e88cf711d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {
}
}
}
}
}