mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 12:04:50 +08:00
@@ -25,7 +25,7 @@ class ReplySearchChildController
|
||||
Future<LoadingState<SearchItemReply>> customGetData() {
|
||||
return ReplyGrpc.searchItem(
|
||||
page: page,
|
||||
itemType: searchType == ReplySearchType.video
|
||||
itemType: searchType == .video
|
||||
? SearchItemType.VIDEO
|
||||
: SearchItemType.ARTICLE,
|
||||
oid: controller.oid,
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show SearchItem, SearchItemVideoSubType;
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_search_type.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
@@ -29,7 +28,7 @@ class ReplySearchItem extends StatelessWidget {
|
||||
String? category;
|
||||
int? duration;
|
||||
switch (type) {
|
||||
case ReplySearchType.video:
|
||||
case .video:
|
||||
if (item.video.type == SearchItemVideoSubType.UGC) {
|
||||
final ugc = item.video.ugc;
|
||||
title = ugc.title;
|
||||
@@ -42,7 +41,7 @@ class ReplySearchItem extends StatelessWidget {
|
||||
cover = pgc.cover;
|
||||
category = pgc.category;
|
||||
}
|
||||
case ReplySearchType.article:
|
||||
case .article:
|
||||
final article = item.article;
|
||||
title = article.title;
|
||||
cover = article.covers.firstOrNull ?? '';
|
||||
@@ -88,7 +87,7 @@ class ReplySearchItem extends StatelessWidget {
|
||||
right: 6,
|
||||
bottom: 6,
|
||||
text: DurationUtils.formatDuration(duration),
|
||||
type: PBadgeType.gray,
|
||||
type: .gray,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:PiliPlus/models/common/reply/reply_search_type.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_search_item/child/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -16,11 +15,11 @@ class ReplySearchController extends GetxController
|
||||
late final TextEditingController editingController;
|
||||
|
||||
late final videoCtr = Get.put(
|
||||
ReplySearchChildController(this, ReplySearchType.video),
|
||||
ReplySearchChildController(this, .video),
|
||||
tag: Utils.generateRandomString(8),
|
||||
);
|
||||
late final articleCtr = Get.put(
|
||||
ReplySearchChildController(this, ReplySearchType.article),
|
||||
ReplySearchChildController(this, .article),
|
||||
tag: Utils.generateRandomString(8),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:PiliPlus/common/widgets/scaffold.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/common/widgets/view_safe_area.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_search_type.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_search_item/child/view.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_search_item/controller.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
@@ -90,11 +89,11 @@ class _ReplySearchPageState extends State<ReplySearchPage> {
|
||||
children: [
|
||||
ReplySearchChildPage(
|
||||
controller: _controller.videoCtr,
|
||||
searchType: ReplySearchType.video,
|
||||
searchType: .video,
|
||||
),
|
||||
ReplySearchChildPage(
|
||||
controller: _controller.articleCtr,
|
||||
searchType: ReplySearchType.article,
|
||||
searchType: .article,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user