mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 17:02:21 -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) {
|
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||||
Server server = adapter.getItem(position);
|
Server server = adapter.getItem(position);
|
||||||
|
|
||||||
|
if (server.getStatus() == Status.DISCONNECTED) {
|
||||||
server.setStatus(Status.CONNECTING);
|
server.setStatus(Status.CONNECTING);
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
binder.connect(server);
|
binder.connect(server);
|
||||||
|
}
|
||||||
|
|
||||||
Intent intent = new Intent(this, ServerActivity.class);
|
Intent intent = new Intent(this, ServerActivity.class);
|
||||||
intent.putExtra("serverId", server.getId());
|
intent.putExtra("serverId", server.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user