Merge branch 'refresh_header_161' into 'master'
Refresh AppDetails header on package state change (fix #161) Update the application details to display the correct state on application install/uninstall. Should fix issue #161 https://gitlab.com/fdroid/fdroidclient/issues/161 See merge request !56
This commit is contained in:
commit
09029dd193
@ -22,7 +22,7 @@
|
|||||||
<fragment
|
<fragment
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/landscape_header"
|
android:id="@+id/header"
|
||||||
android:name="org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment"
|
android:name="org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment"
|
||||||
tools:layout="@layout/app_details_header"/>
|
tools:layout="@layout/app_details_header"/>
|
||||||
|
|
||||||
|
@ -491,6 +491,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
protected void onResumeFragments() {
|
protected void onResumeFragments() {
|
||||||
super.onResumeFragments();
|
super.onResumeFragments();
|
||||||
refreshApkList();
|
refreshApkList();
|
||||||
|
refreshHeader();
|
||||||
supportInvalidateOptionsMenu();
|
supportInvalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,6 +545,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshApkList();
|
refreshApkList();
|
||||||
|
refreshHeader();
|
||||||
supportInvalidateOptionsMenu();
|
supportInvalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,6 +645,12 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refreshHeader() {
|
||||||
|
AppDetailsHeaderFragment headerFragment = (AppDetailsHeaderFragment)
|
||||||
|
getSupportFragmentManager().findFragmentById(R.id.header);
|
||||||
|
headerFragment.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
|
|
||||||
@ -1347,6 +1355,10 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refresh() {
|
||||||
updateViews(getView());
|
updateViews(getView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user