fix: Do not unnecessary request all members in public rooms

This commit is contained in:
Krille 2023-05-20 08:21:33 +02:00
parent f53d17eab7
commit 8c4b2ade88
No known key found for this signature in database

View File

@ -20,7 +20,9 @@ class EncryptionButton extends StatelessWidget {
.where((s) => s.deviceLists != null),
builder: (context, snapshot) {
return FutureBuilder<EncryptionHealthState>(
future: room.calcEncryptionHealthState(),
future: room.encrypted
? room.calcEncryptionHealthState()
: Future.value(EncryptionHealthState.allVerified),
builder: (BuildContext context, snapshot) => IconButton(
tooltip: room.encrypted
? L10n.of(context)!.encrypted