mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-08 18:20:12 +08:00
tweaks (#1142)
* opt: unused layout * mod: semantics * opt: DanmakuMsg type * opt: avoid cast * opt: unnecessary_lambdas * opt: use isEven * opt: logger * opt: invalid common page * tweak * opt: unify DynController
This commit is contained in:
committed by
GitHub
parent
56ffc2781f
commit
5f8313901b
@@ -118,7 +118,7 @@ class DynamicItemModel {
|
||||
idStr = json['item']?['id_str'];
|
||||
// type = json['type']; // int
|
||||
if (json['item']?['modules'] case List list) {
|
||||
modules = ItemModulesModel.fromOpusJson(list.cast());
|
||||
modules = ItemModulesModel.fromOpusJson(list);
|
||||
} else {
|
||||
modules = ItemModulesModel();
|
||||
}
|
||||
@@ -181,8 +181,8 @@ class ItemModulesModel {
|
||||
: null;
|
||||
}
|
||||
|
||||
ItemModulesModel.fromOpusJson(List<Map<String, dynamic>> json) {
|
||||
for (var i in json) {
|
||||
ItemModulesModel.fromOpusJson(List json) {
|
||||
for (Map<String, dynamic> i in json) {
|
||||
switch (i['module_type']) {
|
||||
case 'MODULE_TYPE_TOP':
|
||||
moduleTop = i['module_top'] == null
|
||||
|
||||
Reference in New Issue
Block a user