Rename ShowLocationHelper#showLocationOnMap to ShowLocationHelper#addLocationToMap

This commit is contained in:
Alex Sytnyk 2018-07-11 13:04:45 +03:00
parent 9e5e8bef1f
commit 654b051020
3 changed files with 4 additions and 4 deletions

View file

@ -261,7 +261,7 @@ class TelegramService : Service(), LocationListener, TelegramIncomingMessagesLis
override fun doInBackground(vararg messages: TdApi.Message): Void? {
for (message in messages) {
app.showLocationHelper.showLocationOnMap(message)
app.showLocationHelper.addLocationToMap(message)
}
return null
}

View file

@ -44,7 +44,7 @@ class ShowLocationHelper(private val app: TelegramApplication) {
}
}
fun showLocationOnMap(message: TdApi.Message) {
fun addLocationToMap(message: TdApi.Message) {
execOsmandApi {
val chatTitle = telegramHelper.getChat(message.chatId)?.title
val content = message.content
@ -89,7 +89,7 @@ class ShowLocationHelper(private val app: TelegramApplication) {
execOsmandApi {
val messages = telegramHelper.getChatMessages(chatTitle)
for (message in messages) {
showLocationOnMap(message)
addLocationToMap(message)
}
}
}

View file

@ -227,7 +227,7 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
override fun onTelegramUserChanged(user: TdApi.User) {
val message = telegramHelper.getUserMessage(user)
if (message != null) {
app.showLocationHelper.showLocationOnMap(message)
app.showLocationHelper.addLocationToMap(message)
}
runOnUi {
listeners.forEach { it.get()?.onTelegramUserChanged(user) }