|
|
|
@ -58,8 +58,7 @@ class _ChatEncryptionSettingsState extends State<ChatEncryptionSettings> {
|
|
|
|
|
return Center(child: CircularProgressIndicator());
|
|
|
|
|
}
|
|
|
|
|
final List<DeviceKeys> deviceKeys = snapshot.data;
|
|
|
|
|
return Expanded(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
separatorBuilder: (BuildContext context, int i) =>
|
|
|
|
|
Divider(height: 1),
|
|
|
|
|
itemCount: deviceKeys.length,
|
|
|
|
@ -100,17 +99,15 @@ class _ChatEncryptionSettingsState extends State<ChatEncryptionSettings> {
|
|
|
|
|
.keys["ed25519:${deviceKeys[i].deviceId}"]
|
|
|
|
|
.beautified,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Theme.of(context)
|
|
|
|
|
.textTheme
|
|
|
|
|
.bodyText2
|
|
|
|
|
.color),
|
|
|
|
|
color:
|
|
|
|
|
Theme.of(context).textTheme.bodyText2.color),
|
|
|
|
|
),
|
|
|
|
|
value: deviceKeys[i].verified,
|
|
|
|
|
onChanged: (bool newVal) {
|
|
|
|
|
if (newVal == true) {
|
|
|
|
|
if (deviceKeys[i].blocked) {
|
|
|
|
|
deviceKeys[i].setBlocked(
|
|
|
|
|
false, Matrix.of(context).client);
|
|
|
|
|
deviceKeys[i]
|
|
|
|
|
.setBlocked(false, Matrix.of(context).client);
|
|
|
|
|
}
|
|
|
|
|
deviceKeys[i]
|
|
|
|
|
.setVerified(true, Matrix.of(context).client);
|
|
|
|
@ -127,7 +124,6 @@ class _ChatEncryptionSettingsState extends State<ChatEncryptionSettings> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|