opt publish page

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-28 12:58:50 +08:00
parent 6464987437
commit 6c61ff59ff
8 changed files with 55 additions and 70 deletions

View File

@@ -111,27 +111,23 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
clipBehavior: Clip.none,
children: [
GestureDetector(
onTap: () async {
controller.keepChatPanel();
await PageUtils.imageView(
imgList: imageList
.map(
(img) => switch (img) {
FilePicModel e => SourceModel(
url: e.path,
sourceType: .fileImage,
),
OpusPicModel e => SourceModel(
url: e.url!,
sourceType: .networkImage,
),
},
)
.toList(),
initialPage: index,
);
controller.restoreChatPanel();
},
onTap: () => PageUtils.imageView(
imgList: imageList
.map(
(img) => switch (img) {
FilePicModel e => SourceModel(
url: e.path,
sourceType: .fileImage,
),
OpusPicModel e => SourceModel(
url: e.url!,
sourceType: .networkImage,
),
},
)
.toList(),
initialPage: index,
),
onLongPress: () {
Feedback.forLongPress(context);
onClear();
@@ -328,7 +324,6 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
late double _mentionOffset = 0;
Future<void>? onMention([bool fromClick = false]) async {
controller.keepChatPanel();
final res = await DynMentionPanel.onDynMention(
context,
offset: _mentionOffset,
@@ -345,7 +340,6 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
res.clear();
}
}
controller.restoreChatPanel();
}
void _onInsertUser(MentionItem e, bool fromClick) {