mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 06:08:51 +00:00
AboutFragment: Fix BadTokenException when trying to view the changelog.
This commit is contained in:
parent
1fd42fcfb5
commit
2beddb8807
1 changed files with 3 additions and 1 deletions
|
@ -34,11 +34,13 @@ public class AboutFragment extends PreferenceFragment {
|
|||
private static final String KEY_ABOUT_MARKET_APP = "about_market_app";
|
||||
private static final String KEY_ABOUT_CHANGELOG = "about_changelog";
|
||||
|
||||
private Activity activity;
|
||||
private Application application;
|
||||
|
||||
@Override
|
||||
public void onAttach(final Activity activity) {
|
||||
super.onAttach(activity);
|
||||
this.activity = activity;
|
||||
this.application = (Application) activity.getApplication();
|
||||
}
|
||||
|
||||
|
@ -54,7 +56,7 @@ public class AboutFragment extends PreferenceFragment {
|
|||
findPreference(KEY_ABOUT_CHANGELOG).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
ChangelogDialogBuilder.get(application, Application.versionCode(application), null,
|
||||
ChangelogDialogBuilder.get(activity, Application.versionCode(application), null,
|
||||
Application.versionFlavor(application), 0, null).show();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue