logo和名称替换
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/hj_model/video_model.dart';
|
||||
import 'package:hgmj/hj_page/comment/cell/comment_item.dart';
|
||||
import 'package:hgmj/hj_page/comment/comment_mixin.dart';
|
||||
import 'package:hgmj/hj_page/comment/widget/comment_foot_view.dart';
|
||||
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
|
||||
import 'package:wydj/hj_model/video_model.dart';
|
||||
import 'package:wydj/hj_page/comment/cell/comment_item.dart';
|
||||
import 'package:wydj/hj_page/comment/comment_mixin.dart';
|
||||
import 'package:wydj/hj_page/comment/widget/comment_foot_view.dart';
|
||||
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
|
||||
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
|
||||
|
||||
import '../home/widget/quick_search_view.dart';
|
||||
|
||||
@@ -41,7 +41,6 @@ class CommentLogic extends GetxController with CommentMixin {
|
||||
isLoading = false;
|
||||
fetchComments(objId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CommentView extends StatelessWidget {
|
||||
@@ -63,7 +62,10 @@ class CommentView extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder(
|
||||
init: CommentLogic(objId, commentType: objType, totalCallback: totalCallback, vModel: videoModel),
|
||||
init: CommentLogic(objId,
|
||||
commentType: objType,
|
||||
totalCallback: totalCallback,
|
||||
vModel: videoModel),
|
||||
tag: objId,
|
||||
builder: (logic) => LayoutBuilder(builder: (_, cons) {
|
||||
if (cons.maxHeight < 58) return SizedBox.shrink();
|
||||
@@ -84,7 +86,10 @@ class CommentView extends StatelessWidget {
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
margin: EdgeInsets.fromLTRB(12, 0, 12, 12),
|
||||
decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Color(0x08ffffff)))),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom:
|
||||
BorderSide(color: Color(0x08ffffff)))),
|
||||
child: QuickSearchView(logic.quickSearchList),
|
||||
),
|
||||
),
|
||||
@@ -92,15 +97,19 @@ class CommentView extends StatelessWidget {
|
||||
itemCount: logic.comments.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final topIndex = logic.topPinnedCommentIndex;
|
||||
final showBanner = index == topIndex && logic.commentTopBanners.isNotEmpty;
|
||||
final showBanner = index == topIndex &&
|
||||
logic.commentTopBanners.isNotEmpty;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: CommentItem(
|
||||
key: ValueKey(logic.comments[index].id),
|
||||
logic.comments[index],
|
||||
objId: objId,
|
||||
topBanners: showBanner ? logic.commentTopBanners : null,
|
||||
replyHandler: (comment, {reply}) => logic.readyReplyComment(comment, replyModel: reply),
|
||||
topBanners:
|
||||
showBanner ? logic.commentTopBanners : null,
|
||||
replyHandler: (comment, {reply}) =>
|
||||
logic.readyReplyComment(comment,
|
||||
replyModel: reply),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -114,7 +123,8 @@ class CommentView extends StatelessWidget {
|
||||
Obx(
|
||||
() => CommentFootView(
|
||||
isSending: logic.isSendingMsg.value,
|
||||
onComment: (isSend) => logic.readyReplyComment(null, isSend: isSend),
|
||||
onComment: (isSend) =>
|
||||
logic.readyReplyComment(null, isSend: isSend),
|
||||
textCtr: logic.commentController,
|
||||
imgPath: logic.selectedImagePath.value,
|
||||
onImgChange: (value) => logic.selectedImagePath.value = value,
|
||||
|
||||
Reference in New Issue
Block a user