Made servers closeable by clicking again #22

Merged
Hugo Bayer merged 1 commit from Hugo/113929012020/MadeServersCloseable into master 2020-01-29 10:40:58 +00:00

View file

@ -345,8 +345,12 @@ class _ServerListState extends State<ServerList> {
}
return GestureDetector(
onTap: () {
setState(() => selectedServer = index);
print(index.toString() + " clicked");
setState(() {
if (selectedServer == index)
selectedServer = -1;
else
selectedServer = index;
});
},
child: Container(
width: MediaQuery.of(context).size.width,