mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-10 11:15:09 -05:00
Only connect on click if not already connected or connecting
This commit is contained in:
parent
9efb7b8e4a
commit
3a3e4ae822
@ -120,9 +120,11 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
|
||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||
Server server = adapter.getItem(position);
|
||||
|
||||
server.setStatus(Status.CONNECTING);
|
||||
adapter.notifyDataSetChanged();
|
||||
binder.connect(server);
|
||||
if (server.getStatus() == Status.DISCONNECTED) {
|
||||
server.setStatus(Status.CONNECTING);
|
||||
adapter.notifyDataSetChanged();
|
||||
binder.connect(server);
|
||||
}
|
||||
|
||||
Intent intent = new Intent(this, ServerActivity.class);
|
||||
intent.putExtra("serverId", server.getId());
|
||||
|
Loading…
Reference in New Issue
Block a user