minor changes

This commit is contained in:
Henry Hiles 2025-12-14 16:30:19 -05:00
commit aa6b0f692c
No known key found for this signature in database
3 changed files with 12 additions and 22 deletions

View file

@ -19,6 +19,8 @@ class LoginPage extends HookConsumerWidget {
final isLoading = useState(false);
final allowLogin = useState(false);
final launch = ref.watch(LaunchHelper.provider).launchUrl;
Future<void> setHomeserver(Uri? homeserver) async {
isLoading.value = true;
final succeeded = homeserver == null
@ -142,9 +144,7 @@ class LoginPage extends HookConsumerWidget {
? null
: () => setHomeserver(homeserver.url),
trailing: IconButton(
onPressed: () => ref
.watch(LaunchHelper.provider)
.launchUrl(homeserver.url),
onPressed: () => launch(homeserver.url),
icon: Icon(Icons.info_outline),
),
),
@ -152,9 +152,7 @@ class LoginPage extends HookConsumerWidget {
)),
SizedBox(height: 8),
TextButton(
onPressed: () => ref
.watch(LaunchHelper.provider)
.launchUrl(Uri.https("servers.joinmatrix.org")),
onPressed: () => launch(Uri.https("servers.joinmatrix.org")),
child: Text("See more homeservers..."),
),
if (isLoading.value)