-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix : make peertube link clickable #13015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 3 commits
2d0c48d
71aef84
b8c938b
3b249e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,9 @@ | |
| import android.content.Context; | ||
| import android.content.SharedPreferences; | ||
| import android.os.Bundle; | ||
| import android.text.Html; | ||
| import android.text.InputType; | ||
| import android.text.method.LinkMovementMethod; | ||
| import android.view.LayoutInflater; | ||
| import android.view.Menu; | ||
| import android.view.MenuInflater; | ||
|
|
@@ -84,8 +86,12 @@ public void onViewCreated(@NonNull final View rootView, | |
| @Nullable final Bundle savedInstanceState) { | ||
| super.onViewCreated(rootView, savedInstanceState); | ||
|
|
||
| binding.instanceHelpTV.setText(getString(R.string.peertube_instance_url_help, | ||
| getString(R.string.peertube_instance_list_url))); | ||
| final String instanceListUrl = getString(R.string.peertube_instance_list_url); | ||
| final String helpText = getString(R.string.peertube_instance_url_help, | ||
| "<a href=\"" + instanceListUrl + "\">" + instanceListUrl + "</a>"); | ||
| binding.instanceHelpTV.setText(Html.fromHtml(helpText, Html.FROM_HTML_MODE_LEGACY)); | ||
iampopovich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| binding.instanceHelpTV.setMovementMethod(LinkMovementMethod.getInstance()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that if we use this way, if you set NewPipe as default app of one of the PeerTube instances registered in the Android manifest and if the app is able to open base instance URLs in the future, they will open in NewPipe, which is not what we want. A better approach would be to use a custom Also, sorry if you didn't do so, did you use AI to generate this PR description, while that's forbidden? Its tone seems that's the case to me.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your review !
I did , my apologies if it's forbidden. I just tried to save a couple of minutes on writing the description, cause the change is trivial in my opinion, so I just clicked a copilot button to generate the description automatically. |
||
|
|
||
| binding.addInstanceButton.setOnClickListener(v -> showAddItemDialog(requireContext())); | ||
| binding.instances.setLayoutManager(new LinearLayoutManager(requireContext())); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.