Skip to content

Commit 6c91ca7

Browse files
committed
Check logged-in state before manipulating the search menu
Thanks @raicabogdan. Fixes nodejs#6.
1 parent 455b26f commit 6c91ca7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/zulip/android/ZulipActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public boolean onPrepareOptionsMenu(Menu menu) {
452452
inflater.inflate(R.menu.options, menu);
453453
}
454454

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

0 commit comments

Comments
 (0)