Skip to content

Commit f8c6a33

Browse files
author
freedom-introvert
committed
16号买大乐透怎能忘了我XP版的发布日期5-12,血亏!
1 parent dd667ab commit f8c6a33

22 files changed

Lines changed: 267 additions & 102 deletions

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,15 +563,17 @@ Telegram: [@biliSendCommAntifraud](https://t.me/+6Ugpd4TtB8liZDg1)
563563

564564
### 使用守则
565565

566-
**严禁在b站以视频、动态、文章来宣传本软件**
566+
**严禁在b站以视频、动态、文章等投稿形式来宣传本软件**
567567

568-
同时建议也不要在过于知名的外网键政社区X(Twitter)上宣传,哪里晶哥浓度较高😨
569-
570-
**默许在评论区中分享给需要的人 ,但最好不要报上软件大名**,如“哔哩发评反诈”、“反诈”,可引导到LSP仓库查找哔哩哔哩的评论检查插件。当然,最好的方式是私信发给人家。**特别注意,如果你分享软件的这条评论被ban,请立即删除,更不要申诉自爆!**适用场合:某人说自己评论被吞了、别人看不到等。
568+
遇到别人被吞评论的场景可以把本软件分享给他们。可以在评论区中分享本软件,但还是要注意以下事项,不要和官方对冲!
569+
- 禁止以做视频、发动态、写文章等投稿形式去分享本软件
570+
- 在b站官方的视频任何地方提及本软件
571+
- 你分享本软件的那条评论要是被ban了,请立即删除!**不要去申诉去当自爆卡车!**
572+
- 点赞破百时还是**建议**删了吧,影响太大易出事
571573

572-
**默许,但……评论火了记得删😨**
574+
**当然,最佳方式是私信分享**
573575

574-
*最佳方式是私信分享,最好别用评论。*
576+
同时建议也不要在过于知名的外网键政社区X(Twitter)上宣传,哪里晶哥浓度较高😨
575577

576578
### 用户耻辱柱
577579

biliSendCommAntifraud/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ android {
1515
minSdk 21
1616
//noinspection OldTargetApi
1717
targetSdk 33
18-
versionCode 621
18+
versionCode 625
1919
//versionName "5.9.9_dev_${currentTimeMillis}" //每编译一次改变版本号,以更新模块
20-
versionName "6.2.1"
20+
versionName "6.2.5"
2121
}
2222
buildTypes {
2323
release {

biliSendCommAntifraud/app/src/main/java/icu/freedomIntrovert/biliSendCommAntifraud/CommentLocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class CommentLocator {
1313
public static void lunch(Context context,int areaType,long oid,long rpid,long root,String sourceId) {
1414
AtomicInteger selected = new AtomicInteger(0);
1515
new AlertDialog.Builder(context)
16-
.setTitle("选择b站版本")
16+
.setTitle("选择b站版本(需要挂载XP/LSP)")
1717
.setSingleChoiceItems(new String[]{"国内版" ,"国际版"}, 0, (dialog, which) -> selected.set(which))
1818
.setNegativeButton(R.string.cancel,null)
1919
.setPositiveButton(R.string.ok, (dialog, which) -> {

biliSendCommAntifraud/app/src/main/java/icu/freedomIntrovert/biliSendCommAntifraud/DialogCommCheckWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void onClick(DialogInterface dialog, int which) {
251251
@Override
252252
public void onNoCommentToAppeal(String successToast) {
253253
super.onNoCommentToAppeal(successToast);
254-
statDB.updateHistoryCommentLastState(rpid, HistoryComment.STATE_SUSPECTED_NO_PROBLEM);
254+
//statDB.updateHistoryCommentLastState(rpid, HistoryComment.STATE_SUSPECTED_NO_PROBLEM);
255255
}
256256
});
257257
break;

biliSendCommAntifraud/app/src/main/java/icu/freedomIntrovert/biliSendCommAntifraud/HistoryCommentActivity.java

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import android.app.AlertDialog;
44
import android.app.ProgressDialog;
5+
import android.content.ClipData;
6+
import android.content.ClipboardManager;
57
import android.content.Context;
68
import android.content.DialogInterface;
79
import android.content.Intent;
@@ -45,6 +47,7 @@
4547
import java.util.Date;
4648
import java.util.List;
4749
import java.util.Locale;
50+
import java.util.Map;
4851
import java.util.concurrent.Executor;
4952
import java.util.concurrent.Executors;
5053
import java.util.concurrent.atomic.AtomicBoolean;
@@ -220,8 +223,8 @@ public boolean onCreateOptionsMenu(Menu menu) {
220223
MenuItem menuItem = menu.findItem(R.id.search);
221224
SearchView searchView = (SearchView) menuItem.getActionView();
222225
assert searchView != null;
223-
if (search != null){
224-
searchView.setQuery(search,false);
226+
if (search != null) {
227+
searchView.setQuery(search, false);
225228
}
226229
searchView.setSubmitButtonEnabled(true);
227230
menu.findItem(R.id.花里胡哨).setChecked(config.get花里胡哨Enable());
@@ -373,12 +376,25 @@ public void onClick(DialogInterface dialog, int which) {
373376
}
374377
dialog.dismiss();
375378
});
379+
} else if (itemId == R.id.statistics) {
376380

377-
}/* else if (itemId == R.id.statistics) {
378-
*//*new AlertDialog.Builder(this)
381+
String message = "按照最后状态\n"+generateStat(statisticsDBOpenHelper.countingLastStatus())+
382+
"\n按初始状态\n"+generateStat(statisticsDBOpenHelper.countingFirstStatus());
383+
384+
385+
new AlertDialog.Builder(context)
379386
.setTitle("统计")
380-
.*//*
381-
}*/
387+
.setPositiveButton("关闭",null)
388+
.setNegativeButton("复制", (dialog, which) -> {
389+
ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
390+
ClipData mClipData = ClipData.newPlainText("统计信息",message);
391+
cm.setPrimaryClip(mClipData);
392+
Toast.makeText(context, "已复制", Toast.LENGTH_SHORT).show();
393+
})
394+
.setMessage(message)
395+
.show();
396+
System.out.println();
397+
}
382398
return true;
383399
}
384400

@@ -480,13 +496,13 @@ public void onComplete() {
480496
});
481497
}
482498

483-
private void reloadData(String searchText) {
499+
public void reloadData(String searchText) {
484500
replaceFragment(loadingHistoryCommentFragment);
485501
new HistoryCommentSearchTask(new HistoryCommentSearchTask.EventHandler() {
486502
@Override
487503
public void onResult(List<HistoryComment> historyComments) {
488504
if (!TextUtils.isEmpty(searchText)) {
489-
if (!searchText.startsWith("[rpid]:")){
505+
if (!searchText.startsWith("[rpid]:")) {
490506
Toast.makeText(context, "已搜索到 " + historyComments.size() + " 历史评论", Toast.LENGTH_SHORT).show();
491507
}
492508

@@ -615,7 +631,6 @@ public void error(String msg) {
615631
}
616632
});
617633
}
618-
619634
}
620635

621636
@Override
@@ -638,10 +653,6 @@ private void replaceFragment(Fragment fragment) {
638653
fragmentTransaction.commit();
639654
}
640655

641-
642-
643-
644-
645656
public static List<HistoryComment> filterCommentsWithinRange
646657
(List<HistoryComment> historyCommentList, Date startDate, Date endDate) {
647658
List<HistoryComment> filteredComments = new ArrayList<>();
@@ -659,4 +670,38 @@ public void toastInUi(String message) {
659670
});
660671
}
661672

673+
private String generateStat(Map<String,Integer> map){
674+
int normal = getOrZero(map, "normal");//正常
675+
int shadowBan = getOrZero(map, "shadowBan");//仅自己可见
676+
int deleted = getOrZero(map, "deleted");//已删除
677+
int underReview = getOrZero(map, "underReview");//疑似审核中
678+
int invisible = getOrZero(map, "invisible");//invisible
679+
int sensitive = getOrZero(map, "sensitive");//发送时报敏感
680+
int suspectedNoProblem = getOrZero(map, "suspectedNoProblem");//疑似正常
681+
int unknown = getOrZero(map, "unknown");//未知
682+
int total = normal + shadowBan + deleted + underReview + invisible + sensitive + suspectedNoProblem + unknown;
683+
if (total == 0) {
684+
return "统计结果为空或总数为0\n";
685+
}
686+
return String.format(Locale.getDefault(), "正常:%d (%.2f%%)\n", normal, (normal * 100.0 / total)) +
687+
String.format(Locale.getDefault(), "仅自己可见:%d (%.2f%%)\n", shadowBan, (shadowBan * 100.0 / total)) +
688+
String.format(Locale.getDefault(), "已删除:%d (%.2f%%)\n", deleted, (deleted * 100.0 / total)) +
689+
String.format(Locale.getDefault(), "疑似审核中:%d (%.2f%%)\n", underReview, (underReview * 100.0 / total)) +
690+
String.format(Locale.getDefault(), "不可见:%d (%.2f%%)\n", invisible, (invisible * 100.0 / total)) +
691+
String.format(Locale.getDefault(), "敏感:%d (%.2f%%)\n", sensitive, (sensitive * 100.0 / total)) +
692+
String.format(Locale.getDefault(), "疑似正常:%d (%.2f%%)\n", suspectedNoProblem, (suspectedNoProblem * 100.0 / total)) +
693+
String.format(Locale.getDefault(), "未知:%d (%.2f%%)\n", unknown, (unknown * 100.0 / total)) +
694+
String.format(Locale.getDefault(), "总计:%d\n", total);
695+
}
696+
697+
698+
private static int getOrZero(Map<String,Integer> map, String key){
699+
Integer val = map.get(key);
700+
if (val == null){
701+
return 0;
702+
} else {
703+
return val;
704+
}
705+
}
706+
662707
}

biliSendCommAntifraud/app/src/main/java/icu/freedomIntrovert/biliSendCommAntifraud/HistoryCommentAdapter.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
193193
holder.itemView.setOnClickListener(v -> {
194194
showCommentInfoDialog(historyComment, holder);
195195
});
196+
if (historyComment.appealState == HistoryComment.APPEAL_STATE_NULL){
197+
holder.txv_info.setBackground(null);
198+
} else if (historyComment.appealState == HistoryComment.APPEAL_STATE_NO_COMMENT){
199+
holder.txv_info.setBackground(context.getDrawable(R.color.appeal_no_comment_green));
200+
} else if (historyComment.appealState == HistoryComment.APPEAL_STATE_SUCCESS){
201+
holder.txv_info.setBackground(context.getDrawable(R.color.appeal_success_red));
202+
}
196203
//重发功能已移除,因为使用率极低,替代方案:定位评论,到哔哩哔哩App发送
197204
/*holder.itemView.setOnLongClickListener(v -> {
198205
View view = View.inflate(context, R.layout.edit_text, null);
@@ -232,6 +239,7 @@ private void showCommentInfoDialog(HistoryComment historyComment, ViewHolder hol
232239
TextView txv_first_state = dialogView.findViewById(R.id.txv_first_state);
233240
TextView txv_checked_area = dialogView.findViewById(R.id.txv_checked_area);
234241
TextView txv_uid = dialogView.findViewById(R.id.txv_uid);
242+
TextView txv_appeal_state = dialogView.findViewById(R.id.txv_appeal_state);
235243
SensitiveScanResult scr = historyComment.sensitiveScanResult;
236244
if (scr != null) {
237245
ForegroundColorSpan greenSpan = new ForegroundColorSpan(context.getResources().getColor(R.color.green));
@@ -311,7 +319,13 @@ private void showCommentInfoDialog(HistoryComment historyComment, ViewHolder hol
311319
selectAccountToCheck(historyComment, holder);
312320
return true;
313321
});
314-
322+
if (historyComment.appealState == HistoryComment.APPEAL_STATE_NULL){
323+
txv_appeal_state.setText("未进行申诉");
324+
} else if (historyComment.appealState == HistoryComment.APPEAL_STATE_SUCCESS){
325+
txv_appeal_state.setText("申诉提交成功");
326+
} else if (historyComment.appealState == HistoryComment.APPEAL_STATE_NO_COMMENT) {
327+
txv_appeal_state.setText("无可申诉评论");
328+
}
315329
}
316330

317331
private void showSubMenu(Button button, DialogInterface dialog, ViewHolder holder, HistoryComment historyComment) {
@@ -352,8 +366,13 @@ public boolean onMenuItemClick(@NonNull MenuItem item) {
352366
@Override
353367
public void onNoCommentToAppeal(String successToast) {
354368
super.onNoCommentToAppeal(successToast);
355-
statisticsDBOpenHelper.updateHistoryCommentLastState(historyComment.rpid, HistoryComment.STATE_SUSPECTED_NO_PROBLEM);
356-
notifyItemChanged(holder.getBindingAdapterPosition());
369+
//statisticsDBOpenHelper.updateHistoryCommentLastState(historyComment.rpid, HistoryComment.STATE_SUSPECTED_NO_PROBLEM);
370+
//notifyItemChanged(holder.getBindingAdapterPosition());
371+
}
372+
373+
@Override
374+
public void onComplete() {
375+
context.reloadData(null);
357376
}
358377
});
359378
return true;

0 commit comments

Comments
 (0)