Add copy notify
This commit is contained in:
parent
835e5e272c
commit
3da0a90531
|
|
@ -126,10 +126,10 @@ public class Market extends Spider {
|
||||||
private void checkCopy(String url) {
|
private void checkCopy(String url) {
|
||||||
for (Data data : datas) {
|
for (Data data : datas) {
|
||||||
int index = data.getList().indexOf(new Item(url));
|
int index = data.getList().indexOf(new Item(url));
|
||||||
if (index != -1) {
|
if (index == -1) continue;
|
||||||
String text = data.getList().get(index).getCopy();
|
String text = data.getList().get(index).getCopy();
|
||||||
if (!text.isEmpty()) Utils.copy(text);
|
if (!text.isEmpty()) Utils.copy(text);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,9 +156,9 @@ public class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void copy(String text) {
|
public static void copy(String text) {
|
||||||
ClipboardManager clipboard = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager manager = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData clip = ClipData.newPlainText("fongmi", text);
|
manager.setPrimaryClip(ClipData.newPlainText("fongmi", text));
|
||||||
clipboard.setPrimaryClip(clip);
|
notify("已複製 " + text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadUrl(WebView webView, String script) {
|
public static void loadUrl(WebView webView, String script) {
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
a8d5d275bb8703210af343b98eda5f6d
|
77f83df61dccdda0e660148285fcc94a
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a8d5d275bb8703210af343b98eda5f6d",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;77f83df61dccdda0e660148285fcc94a",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a8d5d275bb8703210af343b98eda5f6d",
|
"spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;77f83df61dccdda0e660148285fcc94a",
|
||||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue