Skip to content

Commit

Permalink
minor improvement for ignoring missing icon pack
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiserdragon2 committed Jul 29, 2023
1 parent 0ae317b commit 889435d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ public void onCreate(Bundle savedInstanceState) {
runOnUiThread(() -> {
if (!OnlyNew && !SecondIcon && (mode < 2 || mode > 5))
findViewById(R.id.text_ipack_chooser).setVisibility(View.GONE);
if(adapter.AdapterSize() < 1){
findViewById(R.id.Nothing).setVisibility(View.VISIBLE);
}
recyclerView.setAdapter(adapter);
switcherLoad.showNext();

Expand Down Expand Up @@ -567,14 +570,14 @@ private ArrayList<AppInfo> prepareData(boolean iPack) {
List<ResolveInfo> list = pm.queryIntentActivities(intent, 0);

if (list.size() < 1){
iPack = false;
OnlyNew =false;
SecondIcon=false;
if (Shortcut) {
iPack = false;
if (Shortcut && mode <= 1) {
intent = new Intent("android.intent.action.CREATE_SHORTCUT", null);
intent.addCategory("android.intent.category.DEFAULT");
}
else {
else if ( mode <= 1 ){
intent = new Intent("android.intent.action.MAIN", null);
intent.addCategory("android.intent.category.LAUNCHER");
}
Expand Down

0 comments on commit 889435d

Please sign in to comment.