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

@ -55,36 +55,31 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
borderRadius: BorderRadius.circular(99),
),
contentPadding: EdgeInsets.zero,
label: hide
? null
: Center(
child: Text(
status.calcLocalizedString(context),
style: TextStyle(
color: status.error != null
? theme.colorScheme.onErrorContainer
: null,
),
),
),
hintText: L10n.of(context).searchChatsRooms,
hintText: hide
? L10n.of(context).searchChatsRooms
: status.calcLocalizedString(context),
hintStyle: TextStyle(
color: theme.colorScheme.onPrimaryContainer,
fontWeight: FontWeight.normal,
),
prefixIcon: controller.isSearchMode
? IconButton(
tooltip: L10n.of(context).cancel,
icon: const Icon(Icons.close_outlined),
onPressed: controller.cancelSearch,
color: theme.colorScheme.onPrimaryContainer,
)
: IconButton(
onPressed: controller.startSearch,
icon: Icon(
Icons.search_outlined,
color: theme.colorScheme.onPrimaryContainer,
),
prefixIcon: hide
? controller.isSearchMode
? IconButton(
tooltip: L10n.of(context).cancel,
icon: const Icon(Icons.close_outlined),
onPressed: controller.cancelSearch,
color: theme.colorScheme.onPrimaryContainer,
)
: IconButton(
onPressed: controller.startSearch,
icon: Icon(
Icons.search_outlined,
color: theme.colorScheme.onPrimaryContainer,
),
)
: Icon(
status.icon,
size: 18,
),
suffixIcon: controller.isSearchMode && globalSearch
? controller.isSearching