Skip to content

Commit

Permalink
修复附件图片的一些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
virskor committed Jan 3, 2021
1 parent cd737a9 commit 5d272ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mobile/ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cbcc2527cf03f6794e5fbef48ae5d5fd
a06c9e6ee74aebe4aa13e3e9300a5b89
3 changes: 1 addition & 2 deletions mobile/lib/widgets/htmRender/htmlRender.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class _HtmlRenderState extends State<HtmlRender>
/// 处理表情渲染
customWidgetBuilder: (element) {
if (element.localName == 'img' &&
element.classes.contains('qq-emotion') &&
element.attributes.containsKey('alt')) {
element.classes.contains('qq-emotion')) {
final src = element.attributes['src'];
return CachedNetworkImage(
imageUrl: src,
Expand Down
8 changes: 2 additions & 6 deletions mobile/lib/widgets/threads/parts/threadGalleriesSnapshot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ThreadGalleriesSnapshot extends StatelessWidget {
///
/// 原图所有图片Url 图集
final List<String> originalImageUrls =
attachmentsModels.map((e) => e.attributes.url).toList();
attachmentsModels.map((e) => e.attributes.url).toList().take(9).toList();

return RepaintBoundary(
child: NineGridView(
Expand All @@ -78,12 +78,8 @@ class ThreadGalleriesSnapshot extends StatelessWidget {
type: NineGridType.normal,

/// normal only
itemCount: attachmentsModels.length >= 8 ? 9 : attachmentsModels.length,
itemCount: attachmentsModels.length,
itemBuilder: (BuildContext context, int index) {
if (index > 8 || index > attachmentsModels.length) {
return const SizedBox();
}

if (attachmentsModels[index] == null) {
return const SizedBox();
}
Expand Down

0 comments on commit 5d272ba

Please sign in to comment.