[app] don't show app details menu before the app and its preferences haven't been loaded
Fixes acra-crash-reports#185, acra-crash-reports#197
This commit is contained in:
parent
cbf422a03c
commit
00b68f0442
|
@ -244,7 +244,8 @@ public class AppDetailsActivity extends AppCompatActivity
|
|||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
final AppPrefs prefs = appPrefs;
|
||||
if (prefs == null) return true;
|
||||
// don't show menu before appPrefs haven't been loaded
|
||||
if (prefs == null || app == null) return false;
|
||||
|
||||
MenuItem itemIgnoreAll = menu.findItem(R.id.action_ignore_all);
|
||||
itemIgnoreAll.setChecked(prefs.getIgnoreAllUpdates());
|
||||
|
|
Loading…
Reference in New Issue