move shareLocationToChat after check for location permission
This commit is contained in:
parent
9357222b58
commit
c7b8fb074d
1 changed files with 3 additions and 3 deletions
|
@ -77,12 +77,12 @@ class SetTimeDialogFragment : DialogFragment() {
|
|||
view.findViewById<TextView>(R.id.primary_btn).apply {
|
||||
text = getString(R.string.shared_string_share)
|
||||
setOnClickListener {
|
||||
chatIdsToDuration.forEach { chatId, expireTime ->
|
||||
settings.shareLocationToChat(chatId, true, expireTime)
|
||||
}
|
||||
if (!AndroidUtils.isLocationPermissionAvailable(view.context)) {
|
||||
AndroidUtils.requestLocationPermission(activity!!)
|
||||
} else {
|
||||
chatIdsToDuration.forEach { chatId, expireTime ->
|
||||
settings.shareLocationToChat(chatId, true, expireTime)
|
||||
}
|
||||
app.shareLocationHelper.startSharingLocation()
|
||||
dismiss()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue