Soru/moor
This commit is contained in:
parent
79a306351e
commit
f594c7005d
55 changed files with 1034 additions and 1133 deletions
|
|
@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
extension LocalizedBody on Event {
|
||||
IconData get statusIcon {
|
||||
switch (this.status) {
|
||||
switch (status) {
|
||||
case -1:
|
||||
return Icons.error_outline;
|
||||
case 0:
|
||||
|
|
@ -22,21 +22,21 @@ extension LocalizedBody on Event {
|
|||
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType) &&
|
||||
(kIsWeb ||
|
||||
(content['info'] is Map &&
|
||||
content['info']['size'] < room.client.store.maxFileSize));
|
||||
content['info']['size'] < room.client.database.maxFileSize));
|
||||
|
||||
String get sizeString {
|
||||
if (content["info"] is Map<String, dynamic> &&
|
||||
content["info"].containsKey("size")) {
|
||||
num size = content["info"]["size"];
|
||||
if (content['info'] is Map<String, dynamic> &&
|
||||
content['info'].containsKey('size')) {
|
||||
num size = content['info']['size'];
|
||||
if (size < 1000000) {
|
||||
size = size / 1000;
|
||||
return "${size.toString()}kb";
|
||||
return '${size.toString()}kb';
|
||||
} else if (size < 1000000000) {
|
||||
size = size / 1000000;
|
||||
return "${size.toString()}mb";
|
||||
return '${size.toString()}mb';
|
||||
} else {
|
||||
size = size / 1000000000;
|
||||
return "${size.toString()}gb";
|
||||
return '${size.toString()}gb';
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue