chore: Make key fingerprints in chat encryption page selectable
This commit is contained in:
parent
4d7f0295ca
commit
8f4c8b7501
1 changed files with 72 additions and 66 deletions
|
|
@ -101,7 +101,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final deviceKeys = snapshot.data!;
|
final deviceKeys = snapshot.data!;
|
||||||
return ListView.builder(
|
return SelectionArea(
|
||||||
|
child: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
itemCount: deviceKeys.length,
|
itemCount: deviceKeys.length,
|
||||||
|
|
@ -132,13 +133,15 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
SwitchListTile(
|
ListTile(
|
||||||
|
leading: Switch.adaptive(
|
||||||
value: !deviceKeys[i].blocked,
|
value: !deviceKeys[i].blocked,
|
||||||
activeThumbColor: deviceKeys[i].verified
|
activeThumbColor: deviceKeys[i].verified
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: Colors.orange,
|
: Colors.orange,
|
||||||
onChanged: (_) =>
|
onChanged: (_) =>
|
||||||
controller.toggleDeviceKey(deviceKeys[i]),
|
controller.toggleDeviceKey(deviceKeys[i]),
|
||||||
|
),
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -164,7 +167,9 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
deviceKeys[i].ed25519Key?.beautified ??
|
deviceKeys[i].ed25519Key?.beautified ??
|
||||||
L10n.of(context).unknownEncryptionAlgorithm,
|
L10n.of(
|
||||||
|
context,
|
||||||
|
).unknownEncryptionAlgorithm,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'RobotoMono',
|
fontFamily: 'RobotoMono',
|
||||||
color: theme.colorScheme.secondary,
|
color: theme.colorScheme.secondary,
|
||||||
|
|
@ -174,6 +179,7 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue