Skip to content

Commit

Permalink
Check logged-in state before manipulating the search menu
Browse files Browse the repository at this point in the history
Thanks @raicabogdan. Fixes nodejs#6.
  • Loading branch information
lfaraone committed Mar 13, 2016
1 parent 455b26f commit 6c91ca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/zulip/android/ZulipActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public boolean onPrepareOptionsMenu(Menu menu) {
inflater.inflate(R.menu.options, menu);
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
if (this.logged_in && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// Get the SearchView and set the searchable configuration
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
final MenuItem searchMenuItem = menu.findItem(R.id.search);
Expand Down

0 comments on commit 6c91ca7

Please sign in to comment.