mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-05 02:39:26 +01:00
add number verification
This commit is contained in:
parent
e71c99d36c
commit
6558139f11
@ -18,9 +18,9 @@ class HomeserverPicker extends StatelessWidget {
|
||||
}
|
||||
|
||||
void _checkHomeserverAction(String homeserver, BuildContext context) async {
|
||||
if (!homeserver.startsWith('https://')) {
|
||||
homeserver = 'https://$homeserver';
|
||||
}
|
||||
// if (!homeserver.startsWith('https://')) {
|
||||
// homeserver = 'https://$homeserver';
|
||||
// }
|
||||
final success = await SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||
Matrix.of(context).client.checkServer(homeserver));
|
||||
if (success != false) {
|
||||
|
@ -42,8 +42,21 @@ class _KeyVerificationPageState extends State<KeyVerificationPage> {
|
||||
case KeyVerificationState.waitingAccept:
|
||||
return Text('Waiting for partner to accept the request...');
|
||||
case KeyVerificationState.askSas:
|
||||
final emojis = widget.request.sasEmojis;
|
||||
final emojiWidgets = emojis.map((e) => Text(e.emoji, style: TextStyle(fontSize: 20))).toList();
|
||||
var emojiWidgets = <Widget>[];
|
||||
// maybe add a button to switch between the two and only determine default
|
||||
// view for if "moji" is a present sasType or not?
|
||||
if (widget.request.sasTypes.contains('emoji')) {
|
||||
emojiWidgets = widget.request.sasEmojis.map((e) => Text(e.emoji, style: TextStyle(fontSize: 20))).toList();
|
||||
} else {
|
||||
final numbers = widget.request.sasNumbers;
|
||||
emojiWidgets = <Widget>[
|
||||
Text(numbers[0].toString(), style: TextStyle(fontSize: 40)),
|
||||
Text('-', style: TextStyle(fontSize: 40)),
|
||||
Text(numbers[1].toString(), style: TextStyle(fontSize: 40)),
|
||||
Text('-', style: TextStyle(fontSize: 40)),
|
||||
Text(numbers[2].toString(), style: TextStyle(fontSize: 40)),
|
||||
];
|
||||
}
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
|
@ -133,8 +133,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "3b9be3546a87def69c10675f2d66e4697ab7dc1b"
|
||||
resolved-ref: "3b9be3546a87def69c10675f2d66e4697ab7dc1b"
|
||||
ref: "50889f9f30d6d083c3c5cf8b669418d82343e5ff"
|
||||
resolved-ref: "50889f9f30d6d083c3c5cf8b669418d82343e5ff"
|
||||
url: "https://gitlab.com/famedly/famedlysdk.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
|
@ -27,7 +27,7 @@ dependencies:
|
||||
famedlysdk:
|
||||
git:
|
||||
url: https://gitlab.com/famedly/famedlysdk.git
|
||||
ref: 3b9be3546a87def69c10675f2d66e4697ab7dc1b
|
||||
ref: 50889f9f30d6d083c3c5cf8b669418d82343e5ff
|
||||
|
||||
localstorage: ^3.0.1+4
|
||||
bubble: ^1.1.9+1
|
||||
|
Loading…
Reference in New Issue
Block a user