chore: Follow up sync status

This commit is contained in:
Krille 2025-02-02 16:51:27 +01:00
commit 7785f7ab2a
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 50 additions and 41 deletions

View file

@ -61,9 +61,10 @@ class ChatAppBarTitle extends StatelessWidget {
builder: (context, snapshot) {
final status = room.client.onSyncStatus.value ??
const SyncStatusUpdate(SyncStatus.waitingForResponse);
final hide = room.client.onSync.value != null &&
status.status != SyncStatus.error &&
room.client.prevBatch != null;
final hide = FluffyThemes.isColumnMode(context) ||
(room.client.onSync.value != null &&
status.status != SyncStatus.error &&
room.client.prevBatch != null);
return AnimatedSize(
duration: FluffyThemes.animationDuration,
child: hide
@ -94,18 +95,16 @@ class ChatAppBarTitle extends StatelessWidget {
)
: Row(
children: [
if (status.error != null) ...[
Icon(
Icons.cloud_off_outlined,
size: 12,
color: status.error != null
? Theme.of(context)
.colorScheme
.onErrorContainer
: null,
),
const SizedBox(width: 4),
],
Icon(
status.icon,
size: 12,
color: status.error != null
? Theme.of(context)
.colorScheme
.onErrorContainer
: null,
),
const SizedBox(width: 4),
Expanded(
child: Text(
status.calcLocalizedString(context),