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) {
|
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||||
Server server = adapter.getItem(position);
|
Server server = adapter.getItem(position);
|
||||||
|
|
||||||
server.setStatus(Status.CONNECTING);
|
if (server.getStatus() == Status.DISCONNECTED) {
|
||||||
adapter.notifyDataSetChanged();
|
server.setStatus(Status.CONNECTING);
|
||||||
binder.connect(server);
|
adapter.notifyDataSetChanged();
|
||||||
|
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