removed settings entry
This commit is contained in:
parent
af411a61ae
commit
bc393e6bcd
|
@ -3,7 +3,6 @@ package org.schabi.newpipe.info_list.holder;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.text.util.Linkify;
|
import android.text.util.Linkify;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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() {
|
ClipboardManager clipboardManager = (ClipboardManager) itemBuilder.getContext()
|
||||||
@Override
|
.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
public boolean onLongClick(View view) {
|
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() {
|
private void ellipsize() {
|
||||||
|
|
|
@ -159,7 +159,6 @@
|
||||||
<string name="show_play_with_kodi_key" translatable="false">show_play_with_kodi</string>
|
<string name="show_play_with_kodi_key" translatable="false">show_play_with_kodi</string>
|
||||||
<string name="show_next_video_key" translatable="false">show_next_video</string>
|
<string name="show_next_video_key" translatable="false">show_next_video</string>
|
||||||
<string name="show_comments_key" translatable="false">show_comments</string>
|
<string name="show_comments_key" translatable="false">show_comments</string>
|
||||||
<string name="copy_comment_long_press" translatable="false">copy_comment_long_press</string>
|
|
||||||
<string name="stream_info_selected_tab_key" translatable="false">stream_info_selected_tab</string>
|
<string name="stream_info_selected_tab_key" translatable="false">stream_info_selected_tab</string>
|
||||||
<string name="show_hold_to_append_key" translatable="false">show_hold_to_append</string>
|
<string name="show_hold_to_append_key" translatable="false">show_hold_to_append</string>
|
||||||
<string name="default_language_value">en</string>
|
<string name="default_language_value">en</string>
|
||||||
|
|
|
@ -76,7 +76,6 @@
|
||||||
<string name="download_thumbnail_title">Load thumbnails</string>
|
<string name="download_thumbnail_title">Load thumbnails</string>
|
||||||
<string name="show_comments_title">Show comments</string>
|
<string name="show_comments_title">Show comments</string>
|
||||||
<string name="show_comments_summary">Disable to stop showing comments</string>
|
<string name="show_comments_summary">Disable to stop showing comments</string>
|
||||||
<string name="copy_comment_long_press_title">Copy comment on long press</string>
|
|
||||||
<string name="download_thumbnail_summary">Turn off to prevent loading thumbnails, saving data and memory usage. Changes clear both in-memory and on-disk image cache.</string>
|
<string name="download_thumbnail_summary">Turn off to prevent loading thumbnails, saving data and memory usage. Changes clear both in-memory and on-disk image cache.</string>
|
||||||
<string name="thumbnail_cache_wipe_complete_notice">Image cache wiped</string>
|
<string name="thumbnail_cache_wipe_complete_notice">Image cache wiped</string>
|
||||||
<string name="metadata_cache_wipe_title">Wipe cached metadata</string>
|
<string name="metadata_cache_wipe_title">Wipe cached metadata</string>
|
||||||
|
|
|
@ -65,11 +65,6 @@
|
||||||
android:title="@string/show_comments_title"
|
android:title="@string/show_comments_title"
|
||||||
android:summary="@string/show_comments_summary"/>
|
android:summary="@string/show_comments_summary"/>
|
||||||
|
|
||||||
<SwitchPreference
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="@string/copy_comment_long_press"
|
|
||||||
android:title="@string/copy_comment_long_press_title"/>
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
|
|
Loading…
Reference in New Issue