fix: tema correto na lista de murais, borda nos itens de chat e ajustes no perfil

This commit is contained in:
2026-09-23 12:14:18 -03:00
parent 48a50744de
commit c0463e51f9
3 changed files with 263 additions and 218 deletions

View File

@@ -73,10 +73,15 @@ class ChatListItem extends StatelessWidget {
final space = this.space;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Material(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
side: BorderSide(
color: theme.colorScheme.surfaceContainer,
width: 1.5,
),
), clipBehavior: Clip.hardEdge,
color: backgroundColor,
child: FutureBuilder(
future: room.name.isEmpty ? room.loadHeroUsers() : null,

View File

@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
import 'package:flutter/material.dart';
import 'package:material_ui/material_ui.dart';
import 'package:matrix/matrix.dart';
import 'package:tatchat/config/app_config.dart';
import 'package:tatchat/l10n/l10n.dart';
@@ -45,7 +45,7 @@ class MuralListItem extends StatelessWidget {
final isMuted = room.pushRuleState != PushRuleState.notify;
final backgroundColor = activeChat
? theme.colorScheme.secondaryContainer
: theme.colorScheme.surfaceContainerLow;
: theme.colorScheme.surface;
final description = this.description;
final creatorName = this.creatorName;
final followers = room.summary.mJoinedMemberCount ?? 0;
@@ -56,7 +56,13 @@ class MuralListItem extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Material(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
side: BorderSide(
color: theme.colorScheme.surfaceContainer,
width: 1.5,
),
),
clipBehavior: Clip.hardEdge,
color: backgroundColor,
child: InkWell(
@@ -80,52 +86,80 @@ class MuralListItem extends StatelessWidget {
),
const SizedBox(width: 12),
Expanded(
flex: 3,
child: Text(
displayname,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
),
if (isMuted)
const Padding(
padding: EdgeInsets.only(left: 4),
child: Icon(Icons.notifications_off_outlined, size: 16),
),
if (room.isFavourite)
Padding(
padding: const EdgeInsets.only(left: 4),
child: Icon(
Icons.push_pin,
size: 16,
color: theme.colorScheme.primary,
),
),
if (creatorName != null && creatorName.isNotEmpty) ...[
const SizedBox(width: 12),
Flexible(
flex: 1,
child: Text(
'${l10n.by} $creatorName',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: mutedStyle?.copyWith(
fontStyle: FontStyle.italic,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded(
flex: 3,
child: Text(
displayname,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
),
if (isMuted)
const Padding(
padding: EdgeInsets.only(left: 4),
child: Icon(
Icons.notifications_off_outlined,
size: 16,
),
),
if (room.isFavourite)
Padding(
padding: const EdgeInsets.only(left: 4),
child: Icon(
Icons.push_pin,
size: 16,
color: theme.colorScheme.primary,
),
),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (creatorName != null &&
creatorName.isNotEmpty) ...[
// const SizedBox(width: 12),
Flexible(
flex: 1,
child: Text(
'${l10n.by} $creatorName',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: mutedStyle?.copyWith(
fontStyle: FontStyle.italic,
),
),
),
],
const Spacer(),
Row(
children: [
Icon(
Icons.group_outlined,
size: 16,
color: theme.colorScheme.onSurfaceVariant,
),
const SizedBox(width: 2),
Text(
l10n.countFollowers(followers),
style: mutedStyle,
),
],
),
],
),
],
),
],
const SizedBox(width: 8),
Icon(
Icons.group_outlined,
size: 16,
color: theme.colorScheme.onSurfaceVariant,
),
const SizedBox(width: 4),
Text(l10n.countFollowers(followers), style: mutedStyle),
],
),
if (description != null && description.isNotEmpty)
@@ -133,7 +167,7 @@ class MuralListItem extends StatelessWidget {
padding: const EdgeInsets.only(top: 8),
child: Text(
description,
maxLines: 2,
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant,