chore: Hide homepage button if not preset

This commit is contained in:
Christian Kußowski 2026-02-22 12:31:35 +01:00
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, itemCount: publicHomeservers.length,
itemBuilder: (context, i) { itemBuilder: (context, i) {
final server = publicHomeservers[i]; final server = publicHomeservers[i];
final homepage = server.homepage;
return RadioListTile.adaptive( return RadioListTile.adaptive(
value: server, value: server,
radioScaleFactor: radioScaleFactor:
@ -104,19 +105,18 @@ class SignInPage extends StatelessWidget {
title: Row( title: Row(
children: [ children: [
Expanded(child: Text(server.name ?? 'Unknown')), Expanded(child: Text(server.name ?? 'Unknown')),
SizedBox.square( if (homepage != null)
dimension: 32, SizedBox.square(
child: IconButton( dimension: 32,
icon: const Icon( child: IconButton(
Icons.open_in_new_outlined, icon: const Icon(
size: 16, Icons.open_in_new_outlined,
), size: 16,
onPressed: () => launchUrlString( ),
server.homepage ?? onPressed: () =>
'https://${server.name}', launchUrlString(homepage),
), ),
), ),
),
], ],
), ),
subtitle: Column( subtitle: Column(