From 32737ae311c0b466a1111925a2fb9b5168858058 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 31 May 2021 15:38:07 -0700 Subject: [PATCH] Bugfix for accounts that have no servers... --- lib/config.dart | 2 +- lib/views/addcontactview.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config.dart b/lib/config.dart index 281f4c0d..7d0c4b8d 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -3,4 +3,4 @@ const dev_version = "development"; class EnvironmentConfig { static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version); static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now"); -} \ No newline at end of file +} diff --git a/lib/views/addcontactview.dart b/lib/views/addcontactview.dart index fa30972e..2ab248cc 100644 --- a/lib/views/addcontactview.dart +++ b/lib/views/addcontactview.dart @@ -34,7 +34,7 @@ class _AddContactViewState extends State { @override Widget build(BuildContext context) { // if we haven't picked a server yet, pick the first one in the list... - if (server.isEmpty) { + if (server.isEmpty && Provider.of(context).serverList.servers.isNotEmpty) { server = Provider.of(context).serverList.servers.first.onion; }