chore: Hide homepage button if not preset

This commit is contained in:
Christian Kußowski 2026-02-22 12:31:35 +01:00
parent bfbcd31f35
commit 9f5794004e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -91,6 +91,7 @@ class SignInPage extends StatelessWidget {
itemCount: publicHomeservers.length,
itemBuilder: (context, i) {
final server = publicHomeservers[i];
final homepage = server.homepage;
return RadioListTile.adaptive(
value: server,
radioScaleFactor:
@ -104,19 +105,18 @@ class SignInPage extends StatelessWidget {
title: Row(
children: [
Expanded(child: Text(server.name ?? 'Unknown')),
SizedBox.square(
dimension: 32,
child: IconButton(
icon: const Icon(
Icons.open_in_new_outlined,
size: 16,
),
onPressed: () => launchUrlString(
server.homepage ??
'https://${server.name}',
if (homepage != null)
SizedBox.square(
dimension: 32,
child: IconButton(
icon: const Icon(
Icons.open_in_new_outlined,
size: 16,
),
onPressed: () =>
launchUrlString(homepage),
),
),
),
],
),
subtitle: Column(