From 50995e57ff7eb9d5c587e5722100f2ad20e42156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 19 Oct 2025 07:25:15 +0200 Subject: [PATCH] chore: Follow up encryption button design --- lib/pages/chat/encryption_button.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/pages/chat/encryption_button.dart b/lib/pages/chat/encryption_button.dart index 3bc556b4a..a18e10609 100644 --- a/lib/pages/chat/encryption_button.dart +++ b/lib/pages/chat/encryption_button.dart @@ -21,6 +21,7 @@ class EncryptionButton extends StatelessWidget { .stream .where((s) => s.deviceLists != null), builder: (context, snapshot) { + final shouldBeEncrypted = room.joinRules != JoinRules.public; return FutureBuilder( future: room.encrypted ? room.calcEncryptionHealthState() @@ -46,9 +47,13 @@ class EncryptionButton extends StatelessWidget { ), ), child: Icon( - room.encrypted ? Icons.lock_outlined : Icons.lock_open_outlined, + room.encrypted + ? Icons.lock_outlined + : Icons.no_encryption_outlined, size: 20, - color: theme.colorScheme.onSurface, + color: (shouldBeEncrypted && !room.encrypted) + ? theme.colorScheme.error + : theme.colorScheme.onSurface, ), ), onPressed: () => context.go('/rooms/${room.id}/encryption'),