filter dyn arc title

Closes #1075

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-24 17:28:18 +08:00
parent fe191ef934
commit 7d30c9c66a

View File

@@ -18,7 +18,19 @@ class DynamicsDataModel {
final opus = moduleDynamic?.major?.opus; final opus = moduleDynamic?.major?.opus;
return (opus?.title ?? '') + return (opus?.title ?? '') +
(opus?.summary?.text ?? '') + (opus?.summary?.text ?? '') +
(moduleDynamic?.desc?.text ?? ''); (moduleDynamic?.desc?.text ?? '') +
_getArcTitle(moduleDynamic?.major);
}
static String _getArcTitle(DynamicMajorModel? major) {
final title = switch (major?.type) {
'MAJOR_TYPE_ARCHIVE' => major?.archive?.title,
'MAJOR_TYPE_UGC_SEASON' => major?.ugcSeason?.title,
'MAJOR_TYPE_PGC' => major?.pgc?.title,
'MAJOR_TYPE_COURSES' => major?.courses?.title,
_ => null,
};
return title ?? '';
} }
static RegExp banWordForDyn = RegExp( static RegExp banWordForDyn = RegExp(