mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
check uploadPictureIconState
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -33,6 +33,7 @@ class ReplyPage extends CommonRichTextPubPage {
|
||||
final int replyType;
|
||||
final ReplyInfo? replyItem;
|
||||
final String? hint;
|
||||
final bool canUploadPic;
|
||||
|
||||
const ReplyPage({
|
||||
super.key,
|
||||
@@ -45,6 +46,7 @@ class ReplyPage extends CommonRichTextPubPage {
|
||||
required this.replyType,
|
||||
this.replyItem,
|
||||
this.hint,
|
||||
this.canUploadPic = true,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -183,8 +185,12 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
ToolbarIconButton(
|
||||
tooltip: '图片',
|
||||
selected: false,
|
||||
icon: const Icon(Icons.image, size: 22),
|
||||
onPressed: onPickImage,
|
||||
icon: widget.canUploadPic
|
||||
? const Icon(Icons.image, size: 22)
|
||||
: const Icon(Icons.image_not_supported, size: 22),
|
||||
onPressed: widget.canUploadPic
|
||||
? onPickImage
|
||||
: () => SmartDialog.showToast('当前评论区不支持发送图片'),
|
||||
),
|
||||
],
|
||||
const SizedBox(width: 8),
|
||||
|
||||
@@ -166,7 +166,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
}) {
|
||||
assert(replyItem != null && index != null);
|
||||
|
||||
final (bool inputDisable, String? hint) = replyHint;
|
||||
final (bool inputDisable, bool canUploadPic, String? hint) = replyHint;
|
||||
if (inputDisable) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user