Open m.youtube links (#50)

This commit is contained in:
vfsfitvnm
2022-06-19 10:59:51 +02:00
parent f7738cde95
commit f7a6481323
2 changed files with 9 additions and 1 deletions

View File

@@ -42,6 +42,10 @@
android:host="www.youtube.com"
android:pathPrefix="/playlist"
android:scheme="https" />
<data
android:host="m.youtube.com"
android:pathPrefix="/playlist"
android:scheme="https" />
<data
android:host="music.youtube.com"
android:pathPrefix="/watch"
@@ -50,6 +54,10 @@
android:host="www.youtube.com"
android:pathPrefix="/watch"
android:scheme="https" />
<data
android:host="m.youtube.com"
android:pathPrefix="/watch"
android:scheme="https" />
</intent-filter>
</activity>

View File

@@ -110,7 +110,7 @@ fun SearchScreen(
val coroutineScope = rememberCoroutineScope()
val isOpenableUrl = remember(textFieldValue.text) {
Regex("""https://(music|www)\.youtube.com/(watch|playlist).*""").matches(textFieldValue.text)
Regex("""https://(music|www|m)\.youtube.com/(watch|playlist).*""").matches(textFieldValue.text)
}
LaunchedEffect(Unit) {