diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt index 3e1ae9601a..bacc7605f1 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt @@ -77,12 +77,12 @@ class SetTimeDialogFragment : DialogFragment() { view.findViewById(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() }