changed that when the displayname is empty it will be saved as empty #30

Merged
Hugo Bayer merged 1 commit from Hugo/144729012020/FixedDisplayNameBehaviour into master 2020-01-29 13:49:23 +00:00

View file

@ -105,9 +105,7 @@ class _ServerListState extends State<ServerList> {
uri.text.isNotEmpty) { uri.text.isNotEmpty) {
_formKey.currentState.save(); _formKey.currentState.save();
_addServer( _addServer(
serverName.text.isEmpty serverName.text,
? uri.text
: serverName.text,
uri.text); uri.text);
} }
}, },
@ -209,7 +207,7 @@ class _ServerListState extends State<ServerList> {
child: Align( child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Text(
servers[index].displayName, servers[index].displayName.isEmpty?servers[index].uri:servers[index].displayName,
style: TextStyle(fontSize: 24), style: TextStyle(fontSize: 24),
), ),
), ),