mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
chore: Follow up fix
This commit is contained in:
parent
534c84db7d
commit
4a7b980aea
@ -5,6 +5,7 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
|||||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
||||||
|
import 'package:fluffychat/utils/size_string.dart';
|
||||||
import 'matrix_file_extension.dart';
|
import 'matrix_file_extension.dart';
|
||||||
|
|
||||||
extension LocalizedBody on Event {
|
extension LocalizedBody on Event {
|
||||||
@ -42,15 +43,10 @@ extension LocalizedBody on Event {
|
|||||||
isThumbnailSmallEnough ||
|
isThumbnailSmallEnough ||
|
||||||
(content['url'] is String));
|
(content['url'] is String));
|
||||||
|
|
||||||
String? get sizeString {
|
String? get sizeString => content
|
||||||
if (content['info'] is Map<String, dynamic> &&
|
.tryGetMap<String, dynamic>('info')
|
||||||
content['info'].containsKey('size')) {
|
?.tryGet<int>('size')
|
||||||
final size = content['info']['size'];
|
?.sizeString;
|
||||||
return size.sizeString;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static final _downloadAndDecryptFutures = <String, Future<MatrixFile>>{};
|
static final _downloadAndDecryptFutures = <String, Future<MatrixFile>>{};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user