mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-10 05:08:18 -05:00
Disable menu items that cannot be used while disconnected
This commit is contained in:
parent
e6411b4747
commit
a79794ba1d
@ -225,6 +225,19 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On prepare options menu
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean onPrepareOptionsMenu(Menu menu)
|
||||||
|
{
|
||||||
|
menu.getItem(0).setEnabled(server.isConnected()); // join
|
||||||
|
menu.getItem(1).setEnabled(server.isConnected()); // users
|
||||||
|
menu.getItem(2).setEnabled(server.isConnected()); // close
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On menu item selected
|
* On menu item selected
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user