logo和名称替换

This commit is contained in:
谢宇宁
2026-10-14 11:23:36 +07:00
parent 1cb514cd02
commit c5c04a7967
478 changed files with 8990 additions and 4948 deletions
+12 -7
View File
@@ -1,9 +1,9 @@
import 'dart:convert';
import 'package:hgmj/hj_model/drama/drama_models.dart';
import 'package:hgmj/hj_model/drama_media_info.dart';
import 'package:hgmj/tools_base/cache/history/base_history_record_store.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:wydj/hj_model/drama/drama_models.dart';
import 'package:wydj/hj_model/drama_media_info.dart';
import 'package:wydj/tools_base/cache/history/base_history_record_store.dart';
import 'package:wydj/tools_base/debug_log.dart';
/// 短剧观看记录:纯本地,不依赖后端。一部剧一行(看到哪一集、第几秒 + 剧信息快照),
/// 最多留 [BaseHistoryRecordStore.maxRows] 条,超了先淘汰最久没看的那部。
@@ -114,7 +114,8 @@ class DramaResumeStore extends BaseHistoryRecordStore {
record(
mediaId: mediaId,
//空 contentId 会被 record 挡掉,那样这次刷新就白记了,退回当前这一集
contentId: last?.contentId.isNotEmpty == true ? last!.contentId : contentId,
contentId:
last?.contentId.isNotEmpty == true ? last!.contentId : contentId,
seconds: last?.progressSeconds ?? 0,
drama: drama ?? last?.drama,
);
@@ -130,7 +131,10 @@ class DramaResumeStore extends BaseHistoryRecordStore {
}) {
//空串和 null 一样要挡:contentId 为空的记录谁都匹配不上,
//却会把这部剧上一条好记录顶掉,还会让 _resumeIndex 白翻完整部剧的分页
if (mediaId == null || mediaId.isEmpty || contentId == null || contentId.isEmpty) return;
if (mediaId == null ||
mediaId.isEmpty ||
contentId == null ||
contentId.isEmpty) return;
final item = DramaResume(
mediaId: mediaId,
contentId: contentId,
@@ -141,7 +145,8 @@ class DramaResumeStore extends BaseHistoryRecordStore {
_put(mediaId, item);
//不等落盘:主键冲突走 REPLACE,顺带把 create_time 刷成本次时间,超量时最久没看的先淘汰。
//必须接住异常,否则 db 出错会变成没人管的 async error
save(modelId: mediaId, modelDataJson: jsonEncode(item.toJson())).catchError((e) {
save(modelId: mediaId, modelDataJson: jsonEncode(item.toJson()))
.catchError((e) {
debugLog('短剧续播记录写入失败', e.toString());
return false;
});