change check for currentSharingMode

This commit is contained in:
Vitaliy 2018-09-28 17:01:11 +03:00 committed by GitHub
parent 41271f87e8
commit 3b1e1d19a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ class ShareLocationHelper(private val app: TelegramApplication) {
if (location != null && app.isInternetConnectionAvailable) {
val chatLivePeriods = app.settings.getChatLivePeriods()
if (chatLivePeriods.isNotEmpty()) {
if (app.settings.currentSharingMode == TelegramUiHelper.getUserName(app.telegramHelper.getCurrentUser()!!)) {
if (app.settings.currentSharingMode == null) {
app.telegramHelper.sendLiveLocationMessage(chatLivePeriods, location.latitude, location.longitude)
} else {
chatLivePeriods.forEach { (chatId, livePeriod) ->