mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Make pasting repo url better
This commit is contained in:
parent
132dda6f4c
commit
9509692b39
1 changed files with 9 additions and 1 deletions
|
@ -92,7 +92,15 @@ class ExtensionsFragment : Fragment() {
|
|||
(activity?.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager?)?.primaryClip?.getItemAt(
|
||||
0
|
||||
)?.text?.toString()?.let { copy ->
|
||||
dialog.repo_url_input?.setText(copy)
|
||||
// Fix our own repo links and only paste the text if it's a link.
|
||||
if (copy.startsWith("http")) {
|
||||
val fixedUrl = if (copy.startsWith("https://cs.repo")) {
|
||||
"https://" + copy.substringAfter("?")
|
||||
} else {
|
||||
copy
|
||||
}
|
||||
dialog.repo_url_input?.setText(fixedUrl)
|
||||
}
|
||||
}
|
||||
|
||||
// dialog.text2?.text = provider.name
|
||||
|
|
Loading…
Reference in a new issue