From bc393e6bcd733d29b4724e35e2a1821677738780 Mon Sep 17 00:00:00 2001 From: Harshal Lele Date: Tue, 4 Feb 2020 18:01:39 +0530 Subject: [PATCH] removed settings entry --- .../holder/CommentsMiniInfoItemHolder.java | 26 +++++++------------ app/src/main/res/values/settings_keys.xml | 1 - app/src/main/res/values/strings.xml | 1 - app/src/main/res/xml/content_settings.xml | 5 ---- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index 4b1d1bdae..592378dc0 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -3,7 +3,6 @@ package org.schabi.newpipe.info_list.holder; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; -import android.preference.PreferenceManager; import android.text.util.Linkify; import android.view.View; import android.view.ViewGroup; @@ -128,25 +127,20 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { } }); - boolean copyCommentOnLongPress = PreferenceManager.getDefaultSharedPreferences( - itemBuilder.getContext()).getBoolean(itemBuilder.getContext().getString(R.string.copy_comment_long_press), - false); - if(copyCommentOnLongPress){ + itemView.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View view) { - itemView.setOnLongClickListener(new View.OnLongClickListener() { - @Override - public boolean onLongClick(View view) { + ClipboardManager clipboardManager = (ClipboardManager) itemBuilder.getContext() + .getSystemService(Context.CLIPBOARD_SERVICE); + clipboardManager.setPrimaryClip(ClipData.newPlainText(null,itemContentView.getText())); + Toast.makeText(itemBuilder.getContext(), R.string.msg_copied, Toast.LENGTH_SHORT).show(); + return true; - ClipboardManager clipboardManager = (ClipboardManager) itemBuilder.getContext().getSystemService(Context.CLIPBOARD_SERVICE); - clipboardManager.setPrimaryClip(ClipData.newPlainText(null,itemContentView.getText())); - Toast.makeText(itemBuilder.getContext(), R.string.msg_copied, Toast.LENGTH_SHORT).show(); - return true; + } + }); - } - }); - - } } private void ellipsize() { diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 90edd0ef8..1a7d61dae 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -159,7 +159,6 @@ show_play_with_kodi show_next_video show_comments - copy_comment_long_press stream_info_selected_tab show_hold_to_append en diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ca5a7527f..dab9bde10 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -76,7 +76,6 @@ Load thumbnails Show comments Disable to stop showing comments - Copy comment on long press Turn off to prevent loading thumbnails, saving data and memory usage. Changes clear both in-memory and on-disk image cache. Image cache wiped Wipe cached metadata diff --git a/app/src/main/res/xml/content_settings.xml b/app/src/main/res/xml/content_settings.xml index d1080bb4d..2187b4a3c 100644 --- a/app/src/main/res/xml/content_settings.xml +++ b/app/src/main/res/xml/content_settings.xml @@ -65,11 +65,6 @@ android:title="@string/show_comments_title" android:summary="@string/show_comments_summary"/> -