Adress requested changes and remove an unused return value in NewPipeTextViewHelper

This commit is contained in:
TiA4f8R 2021-10-02 19:53:17 +02:00
parent 648641341f
commit 35401c0103
3 changed files with 7 additions and 12 deletions

View file

@ -29,11 +29,8 @@ public final class NewPipeTextViewHelper {
* @param textView the {@link TextView} on which sharing the selected text. It should be a
* {@link NewPipeTextView} or a {@link NewPipeEditText} (even if
* {@link TextView standard TextViews} are supported).
*
* @return true if no exceptions occurred when getting the selected text, sharing it and
* deselecting it, otherwise an exception
*/
public static boolean shareSelectedTextWithShareUtils(@NonNull final TextView textView) {
public static void shareSelectedTextWithShareUtils(@NonNull final TextView textView) {
if (!(textView instanceof NewPipeEditText)) {
final CharSequence textViewText;
if (textView instanceof NewPipeTextView) {
@ -59,8 +56,6 @@ public final class NewPipeTextViewHelper {
shareSelectedTextIfNotNullAndNotEmpty(textView, selectedText);
Selection.setSelection(text, editText.getSelectionEnd());
}
return true;
}
@Nullable