catch npe on participants context menu
This commit is contained in:
parent
6e1394ab40
commit
e735be323e
|
@ -257,6 +257,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextItemSelected(MenuItem item) {
|
public boolean onContextItemSelected(MenuItem item) {
|
||||||
|
final User user = mUserPreviewAdapter.getSelectedUser();
|
||||||
|
if (user == null) {
|
||||||
|
Toast.makeText(this, R.string.unable_to_perform_this_action, Toast.LENGTH_SHORT).show();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!MucDetailsContextMenuHelper.onContextItemSelected(item, mUserPreviewAdapter.getSelectedUser(), this)) {
|
if (!MucDetailsContextMenuHelper.onContextItemSelected(item, mUserPreviewAdapter.getSelectedUser(), this)) {
|
||||||
return super.onContextItemSelected(item);
|
return super.onContextItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -875,4 +875,5 @@
|
||||||
<string name="not_a_backup_file">The file you selected is not a Conversations backup file</string>
|
<string name="not_a_backup_file">The file you selected is not a Conversations backup file</string>
|
||||||
<string name="account_already_setup">This account has already been setup</string>
|
<string name="account_already_setup">This account has already been setup</string>
|
||||||
<string name="please_enter_password">Please enter the password for this account</string>
|
<string name="please_enter_password">Please enter the password for this account</string>
|
||||||
|
<string name="unable_to_perform_this_action">Unable to perform this action</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue