fix problem with deep links

This commit is contained in:
Hunter Kehoe 2022-06-24 10:32:48 -06:00
parent e69692fe9e
commit c5496c3f8c

View file

@ -98,6 +98,7 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
val secure = url.getBooleanQueryParameter("secure", true)
val baseUrl = if (secure) "https://${url.host}" else "http://${url.host}"
val topic = url.pathSegments.first()
title = topicShortUrl(baseUrl, topic)
// Subscribe to topic if it doesn't already exist
lifecycleScope.launch(Dispatchers.IO) {
@ -144,8 +145,6 @@ class DetailActivity : AppCompatActivity(), ActionMode.Callback, NotificationFra
}
}
title = displayName(subscription)
// Add extras needed in loadView(); normally these are added in MainActivity
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_ID, subscription.id)
intent.putExtra(MainActivity.EXTRA_SUBSCRIPTION_BASE_URL, subscription.baseUrl)