Made servers closeable by clicking again #22
1 changed files with 6 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue