Add copy notify

This commit is contained in:
FongMi 2023-10-26 13:41:49 +08:00
parent 835e5e272c
commit 3da0a90531
6 changed files with 10 additions and 10 deletions

View File

@ -126,10 +126,10 @@ public class Market extends Spider {
private void checkCopy(String url) {
for (Data data : datas) {
int index = data.getList().indexOf(new Item(url));
if (index != -1) {
String text = data.getList().get(index).getCopy();
if (!text.isEmpty()) Utils.copy(text);
}
if (index == -1) continue;
String text = data.getList().get(index).getCopy();
if (!text.isEmpty()) Utils.copy(text);
break;
}
}

View File

@ -156,9 +156,9 @@ public class Utils {
}
public static void copy(String text) {
ClipboardManager clipboard = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("fongmi", text);
clipboard.setPrimaryClip(clip);
ClipboardManager manager = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
manager.setPrimaryClip(ClipData.newPlainText("fongmi", text));
notify("已複製 " + text);
}
public static void loadUrl(WebView webView, String script) {

Binary file not shown.

View File

@ -1 +1 @@
a8d5d275bb8703210af343b98eda5f6d
77f83df61dccdda0e660148285fcc94a

View File

@ -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",
"sites": [
{

View File

@ -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",
"sites": [
{