mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 05:03:57 +08:00
@@ -1,11 +0,0 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
|
||||
enum BarHideType with EnumWithLabel {
|
||||
instant('即时'),
|
||||
sync('同步'),
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
const BarHideType(this.label);
|
||||
}
|
||||
@@ -2,8 +2,6 @@ enum UpPanelPosition {
|
||||
top('顶部'),
|
||||
leftFixed('左侧常驻'),
|
||||
rightFixed('右侧常驻'),
|
||||
leftDrawer('左侧抽屉'),
|
||||
rightDrawer('右侧抽屉'),
|
||||
;
|
||||
|
||||
final String label;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
|
||||
enum MemberTabType {
|
||||
def('默认'),
|
||||
home('主页'),
|
||||
@@ -11,12 +9,7 @@ enum MemberTabType {
|
||||
shop('小店'),
|
||||
;
|
||||
|
||||
static bool showMemberShop = Pref.showMemberShop;
|
||||
|
||||
static bool contains(String type) {
|
||||
if (type == shop.name && !showMemberShop) {
|
||||
return false;
|
||||
}
|
||||
for (final e in MemberTabType.values) {
|
||||
if (e.name == type) {
|
||||
return true;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
enum ReplySortType {
|
||||
time('最新评论', '最新'),
|
||||
hot('最热评论', '最热'),
|
||||
time('最新评论', '最新', text: '按时间'),
|
||||
hot('最热评论', '最热', text: '按热度'),
|
||||
select('精选评论', '精选'),
|
||||
;
|
||||
|
||||
final String title;
|
||||
final String label;
|
||||
const ReplySortType(this.title, this.label);
|
||||
final String? text;
|
||||
const ReplySortType(this.title, this.label, {this.text});
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
enum SettingType {
|
||||
privacySetting('隐私设置'),
|
||||
recommendSetting('推荐流设置'),
|
||||
videoSetting('音视频设置'),
|
||||
playSetting('播放器设置'),
|
||||
styleSetting('外观设置'),
|
||||
extraSetting('其它设置'),
|
||||
webdavSetting('WebDAV 设置'),
|
||||
about('关于'),
|
||||
;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class SegmentModel implements Comparable<SegmentModel> {
|
||||
if (config != null) {
|
||||
skipType = config.blockSettings[segmentType.index].second;
|
||||
if (skipType != SkipType.showOnly) {
|
||||
if (segment.isEq || segment.length < config.blockLimit) {
|
||||
if (segment.isEq || segment.length < 0) {
|
||||
skipType = SkipType.showOnly;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
enum SuperChatType {
|
||||
valid('有效时间内显示'),
|
||||
persist('常驻显示'),
|
||||
disable('不显示'),
|
||||
;
|
||||
|
||||
final String title;
|
||||
const SuperChatType(this.title);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'package:PiliPlus/models/common/enum_with_label.dart';
|
||||
|
||||
enum SuperResolutionType with EnumWithLabel {
|
||||
disable('禁用'),
|
||||
efficiency('效率'),
|
||||
quality('画质'),
|
||||
;
|
||||
|
||||
@override
|
||||
final String label;
|
||||
const SuperResolutionType(this.label);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
enum SubtitlePrefType {
|
||||
off('默认不显示字幕'),
|
||||
on('优先选择非自动生成(ai)字幕'),
|
||||
withoutAi('跳过自动生成(ai)字幕,选择第一个可用字幕'),
|
||||
auto('静音时等同第二项,非静音时等同第三项'),
|
||||
;
|
||||
|
||||
final String desc;
|
||||
const SubtitlePrefType(this.desc);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
|
||||
import 'package:PiliPlus/models/common/dynamic/dynamics_type.dart';
|
||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
@@ -44,8 +43,6 @@ class DynamicsDataModel {
|
||||
);
|
||||
static bool enableFilter = banWordForDyn.pattern.isNotEmpty;
|
||||
|
||||
static bool antiGoodsDyn = Pref.antiGoodsDyn;
|
||||
|
||||
DynamicsDataModel.fromJson(
|
||||
Map<String, dynamic> json, {
|
||||
DynamicsTabType type = DynamicsTabType.all,
|
||||
@@ -60,11 +57,10 @@ class DynamicsDataModel {
|
||||
type != DynamicsTabType.up && tempBannedList?.isNotEmpty == true;
|
||||
for (final e in list) {
|
||||
DynamicItemModel item = DynamicItemModel.fromJson(e);
|
||||
if (antiGoodsDyn &&
|
||||
(item.orig?.modules.moduleDynamic?.additional?.type ==
|
||||
'ADDITIONAL_TYPE_GOODS' ||
|
||||
item.modules.moduleDynamic?.additional?.type ==
|
||||
'ADDITIONAL_TYPE_GOODS')) {
|
||||
if ((item.orig?.modules.moduleDynamic?.additional?.type ==
|
||||
'ADDITIONAL_TYPE_GOODS' ||
|
||||
item.modules.moduleDynamic?.additional?.type ==
|
||||
'ADDITIONAL_TYPE_GOODS')) {
|
||||
continue;
|
||||
}
|
||||
if (enableFilter) {
|
||||
@@ -163,7 +159,6 @@ class ItemModulesModel {
|
||||
ModuleDynamicModel? moduleDynamic;
|
||||
// ModuleInterModel? moduleInter;
|
||||
ModuleInteraction? moduleInteraction;
|
||||
ModuleDispute? moduleDispute;
|
||||
|
||||
// 专栏
|
||||
ModuleTop? moduleTop;
|
||||
@@ -173,9 +168,6 @@ class ItemModulesModel {
|
||||
ModuleBlocked? moduleBlocked;
|
||||
ModuleFold? moduleFold;
|
||||
|
||||
static bool showDynDispute = Pref.showDynDispute;
|
||||
static bool showDynInteraction = Pref.showDynInteraction;
|
||||
|
||||
ItemModulesModel.fromJson(Map<String, dynamic> json) {
|
||||
moduleAuthor = json['module_author'] != null
|
||||
? ModuleAuthorModel.fromJson(json['module_author'])
|
||||
@@ -192,16 +184,9 @@ class ItemModulesModel {
|
||||
moduleFold = json['module_fold'] != null
|
||||
? ModuleFold.fromJson(json['module_fold'])
|
||||
: null;
|
||||
if (showDynInteraction) {
|
||||
moduleInteraction = json['module_interaction'] != null
|
||||
? ModuleInteraction.fromJson(json['module_interaction'])
|
||||
: null;
|
||||
}
|
||||
if (showDynDispute) {
|
||||
moduleDispute = json['module_dispute'] != null
|
||||
? ModuleDispute.fromJson(json['module_dispute'])
|
||||
: null;
|
||||
}
|
||||
moduleInteraction = json['module_interaction'] != null
|
||||
? ModuleInteraction.fromJson(json['module_interaction'])
|
||||
: null;
|
||||
}
|
||||
|
||||
ItemModulesModel.fromOpusJson(List json) {
|
||||
@@ -252,18 +237,6 @@ class ItemModulesModel {
|
||||
}
|
||||
}
|
||||
|
||||
class ModuleDispute {
|
||||
String? title;
|
||||
String? desc;
|
||||
String? jumpUrl;
|
||||
|
||||
ModuleDispute.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
desc = json['desc'];
|
||||
jumpUrl = json['jump_url'];
|
||||
}
|
||||
}
|
||||
|
||||
class ModuleInteraction {
|
||||
List<ModuleInteractionItem>? items;
|
||||
|
||||
@@ -424,13 +397,9 @@ class ModuleAuthorModel extends Avatar {
|
||||
pubTime = json['pub_time'];
|
||||
pubTs = json['pub_ts'] == 0 ? null : safeToInt(json['pub_ts']);
|
||||
type = json['type'];
|
||||
if (PendantAvatar.showDecorate) {
|
||||
decorate = json['decorate'] == null
|
||||
? null
|
||||
: Decorate.fromJson(json['decorate']);
|
||||
} else {
|
||||
pendant = null;
|
||||
}
|
||||
decorate = json['decorate'] == null
|
||||
? null
|
||||
: Decorate.fromJson(json['decorate']);
|
||||
isTop = json['is_top'];
|
||||
badgeText = nonNullOrEmptyString(json['icon_badge']?['text']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user