mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-04 16:35:05 -05:00
Disable menu items that cannot be used while disconnected
This commit is contained in:
parent
e6411b4747
commit
a79794ba1d
@ -224,6 +224,19 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user