✨ Search posts
This commit is contained in:
@ -186,7 +186,9 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
|
||||
if (widget.isFullWidth && _attachments.length == 1) {
|
||||
final element = _attachments.first;
|
||||
double ratio = element!.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
final isImage = element!.mimetype.split('/').firstOrNull == 'image';
|
||||
double ratio =
|
||||
element.metadata?['ratio']?.toDouble() ?? (isImage ? 1 : 16 / 9);
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
constraints: BoxConstraints(
|
||||
@ -260,7 +262,9 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
final element = _attachments[idx];
|
||||
idx++;
|
||||
if (element == null) return const SizedBox.shrink();
|
||||
double ratio = element.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
final isImage = element.mimetype.split('/').firstOrNull == 'image';
|
||||
double ratio =
|
||||
element.metadata?['ratio']?.toDouble() ?? (isImage ? 1 : 16 / 9);
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: widget.columnMaxWidth,
|
||||
@ -303,7 +307,9 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
itemBuilder: (context, idx) {
|
||||
final element = _attachments[idx];
|
||||
if (element == null) const SizedBox.shrink();
|
||||
final ratio = element!.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
final isImage = element!.mimetype.split('/').firstOrNull == 'image';
|
||||
double ratio =
|
||||
element.metadata?['ratio']?.toDouble() ?? (isImage ? 1 : 16 / 9);
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: math.min(
|
||||
|
@ -9,7 +9,7 @@ class LoadingIndicator extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLow.withOpacity(0.8),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLow.withOpacity(0.5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
Reference in New Issue
Block a user