mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 08:38:37 +00:00
feat: edit dyn
feat: set pub setting feat: set reply interaction Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/main.dart';
|
||||
import 'package:PiliPlus/models/common/publish_panel_type.dart';
|
||||
import 'package:PiliPlus/models/dynamics/result.dart' show FilePicModel;
|
||||
import 'package:PiliPlus/pages/common/publish/common_rich_text_pub_page.dart';
|
||||
import 'package:PiliPlus/pages/dynamics_mention/controller.dart';
|
||||
import 'package:PiliPlus/pages/emote/view.dart';
|
||||
@@ -110,7 +111,7 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
Widget buildImagePreview() {
|
||||
return Obx(
|
||||
() {
|
||||
if (pathList.isNotEmpty) {
|
||||
if (imageList.isNotEmpty) {
|
||||
return SizedBox(
|
||||
height: 85,
|
||||
child: SingleChildScrollView(
|
||||
@@ -120,7 +121,7 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
spacing: 10,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: List.generate(
|
||||
pathList.length,
|
||||
imageList.length,
|
||||
(index) => buildImage(index, 75),
|
||||
),
|
||||
),
|
||||
@@ -368,7 +369,7 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
if (isRoot && widget.canUploadPic)
|
||||
item(
|
||||
onTap: () async {
|
||||
if (pathList.length >= limit) {
|
||||
if (imageList.length >= limit) {
|
||||
SmartDialog.showToast('最多选择$limit张图片');
|
||||
return;
|
||||
}
|
||||
@@ -385,7 +386,7 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
'$tmpDirPath/${Utils.generateRandomString(8)}.png',
|
||||
);
|
||||
await file.writeAsBytes(res);
|
||||
pathList.add(file.path);
|
||||
imageList.add(FilePicModel(path: file.path));
|
||||
} else {
|
||||
debugPrint('null screenshot');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user