diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/WebLinkHandlerActivity.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/WebLinkHandlerActivity.kt index 0f235f33a..0a73ffdb9 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/WebLinkHandlerActivity.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/WebLinkHandlerActivity.kt @@ -14,6 +14,7 @@ import org.mariotaku.twidere.model.UserKey import org.mariotaku.twidere.util.Analyzer import org.mariotaku.twidere.util.IntentUtils import org.mariotaku.twidere.util.Utils +import java.util.* class WebLinkHandlerActivity : Activity() { @@ -27,7 +28,7 @@ class WebLinkHandlerActivity : Activity() { return } - val (handledIntent, handledSuccessfully) = when (uri.host) { + val (handledIntent, handledSuccessfully) = when (uri.host.toLowerCase(Locale.US)) { "twitter.com", "www.twitter.com", "mobile.twitter.com" -> handleTwitterLink(regulateTwitterUri(uri)) "fanfou.com" -> handleFanfouLink(uri) "twidere.org", "twidere.mariotaku.org" -> handleTwidereExternalLink(uri) diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/util/OnLinkClickHandler.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/util/OnLinkClickHandler.kt index 653dd2f9d..7aa1e1fac 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/util/OnLinkClickHandler.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/util/OnLinkClickHandler.kt @@ -152,6 +152,7 @@ open class OnLinkClickHandler( return } val builder = CustomTabsIntent.Builder() + builder.addDefaultShareMenuItem() (ChameleonUtils.getActivity(context) as? Chameleon.Themeable)?.overrideTheme?.let { theme -> builder.setToolbarColor(theme.colorToolbar) }