fix: salas removidas de vez, paginação no mural, mídia em largura total e teclado nos comentários

This commit is contained in:
2026-09-14 17:15:52 -03:00
parent 8927e80cce
commit 9d69e833bd
8 changed files with 234 additions and 134 deletions

View File

@@ -33,6 +33,7 @@ class MessageContent extends StatelessWidget {
final Timeline timeline;
final bool selected;
final Set<String> bigEmojis;
final bool fullWidthCard;
const MessageContent(
this.event, {
@@ -44,6 +45,7 @@ class MessageContent extends StatelessWidget {
required this.borderRadius,
required this.selected,
required this.bigEmojis,
this.fullWidthCard = false,
});
@override
@@ -67,13 +69,40 @@ class MessageContent extends StatelessWidget {
final h = event.content
.tryGetMap<String, Object?>('info')
?.tryGet<int>('h');
var width = maxSize;
var width = fullWidthCard && event.messageType == MessageTypes.Image
? double.infinity
: maxSize;
var height = maxSize;
var fit = event.messageType == MessageTypes.Sticker
? BoxFit.contain
: BoxFit.cover;
if (w != null && h != null) {
fit = BoxFit.contain;
if (fullWidthCard &&
event.messageType == MessageTypes.Image &&
w > 0 &&
h > 0) {
return AspectRatio(
aspectRatio: w / h,
child: ImageBubble(
event,
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
borderRadius: borderRadius,
timeline: timeline,
textColor: textColor,
onTap: () => showDialog(
context: context,
builder: (_) => ImageViewer(
event,
timeline: timeline,
outerContext: context,
),
),
),
);
}
if (w > h) {
width = maxSize;
height = max(32, maxSize * (h / w));
@@ -124,6 +153,7 @@ class MessageContent extends StatelessWidget {
textColor: textColor,
linkColor: linkColor,
timeline: timeline,
expand: fullWidthCard,
);
case MessageTypes.File:
return MessageDownloadContent(