🐛 Bug fixes on link expansion doesn't show on merged chat event

This commit is contained in:
LittleSheep 2024-08-26 12:13:09 +08:00
parent e38778dbf9
commit fff756cbe0
3 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ class LinkExpandController extends GetxController {
final Map<String, LinkMeta?> _cachedResponse = {};
Future<LinkMeta?> expandLink(String url) async {
log('[LinkExpander] Expanding link... $url');
final target = utf8.fuse(base64).encode(url);
if (_cachedResponse.containsKey(target)) return _cachedResponse[target];
final client = ServiceFinder.configureClient('dealer');

View File

@ -197,8 +197,11 @@ class ChatEvent extends StatelessWidget {
),
],
).paddingOnly(right: 12),
if (!isContentPreviewing)
_buildLinkExpansion().paddingOnly(left: 52, right: 8),
_buildAttachment(context, isMinimal: isContentPreviewing).paddingOnly(
left: isContentPreviewing ? 12 : 56,
right: 8,
),
],
);

View File

@ -2,7 +2,7 @@ name: solian
description: "The Solar Network App"
publish_to: "none"
version: 1.2.1+23
version: 1.2.1+24
environment:
sdk: ">=3.3.4 <4.0.0"