Post update, so all receivers have run
This commit is contained in:
parent
be16137553
commit
d3247b9cfd
@ -133,15 +133,15 @@ public class AppDetails2 extends AppCompatActivity {
|
|||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private ArrayList<Integer> mItems;
|
private ArrayList<Integer> mItems;
|
||||||
private final ApkListAdapter mApkListAdapter;
|
private ApkListAdapter mApkListAdapter;
|
||||||
|
|
||||||
public AppDetailsRecyclerViewAdapter(Context context) {
|
public AppDetailsRecyclerViewAdapter(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mApkListAdapter = new ApkListAdapter(mContext, mApp);
|
|
||||||
updateItems();
|
updateItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateItems() {
|
public void updateItems() {
|
||||||
|
mApkListAdapter = new ApkListAdapter(mContext, mApp);
|
||||||
if (mItems == null)
|
if (mItems == null)
|
||||||
mItems = new ArrayList<>();
|
mItems = new ArrayList<>();
|
||||||
else
|
else
|
||||||
@ -947,14 +947,19 @@ public class AppDetails2 extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onAppChanged() {
|
private void onAppChanged() {
|
||||||
if (!reset(mApp.packageName)) {
|
mRecyclerView.post(new Runnable() {
|
||||||
this.finish();
|
@Override
|
||||||
return;
|
public void run() {
|
||||||
}
|
if (!reset(mApp.packageName)) {
|
||||||
mRecyclerView.getAdapter().notifyDataSetChanged();
|
AppDetails2.this.finish();
|
||||||
//refreshApkList();
|
return;
|
||||||
//refreshHeader();
|
}
|
||||||
supportInvalidateOptionsMenu();
|
AppDetailsRecyclerViewAdapter adapter = (AppDetailsRecyclerViewAdapter)mRecyclerView.getAdapter();
|
||||||
|
adapter.updateItems();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
supportInvalidateOptionsMenu();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isAppInstalled() {
|
private boolean isAppInstalled() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user