add FLAG_ACTIVITY_NEW_TASK for incoming location message

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-06-08 12:13:31 +02:00 committed by Andy Scherzinger
parent 2154b6cf94
commit 4190cf1dfe
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -310,6 +310,7 @@ class IncomingLocationMessageViewHolder(incomingView: View) : MessageHolders
if (!locationGeoLink.isNullOrEmpty()) {
val geoLinkWithMarker = addMarkerToGeoLink(locationGeoLink!!)
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(geoLinkWithMarker))
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context!!.startActivity(browserIntent)
} else {
Toast.makeText(context, R.string.nc_common_error_sorry, Toast.LENGTH_LONG).show()