feat: Display warning banner on unverified devices
This commit is contained in:
parent
f49a653c75
commit
d8acd92023
6 changed files with 73 additions and 2 deletions
|
|
@ -32,6 +32,28 @@ class DevicesSettingsController extends State<DevicesSettings> {
|
|||
bool loadingDeletingDevices = false;
|
||||
String? errorDeletingDevices;
|
||||
|
||||
bool? chatBackupEnabled;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_checkChatBackup();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void _checkChatBackup() async {
|
||||
final client = Matrix.of(context).client;
|
||||
if (client.encryption?.keyManager.enabled == true) {
|
||||
if (await client.encryption?.keyManager.isCached() == false ||
|
||||
await client.encryption?.crossSigning.isCached() == false ||
|
||||
client.isUnknownSession && !mounted) {
|
||||
setState(() {
|
||||
chatBackupEnabled = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void removeDevicesAction(List<Device> devices) async {
|
||||
if (await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue