Fix gliches
This commit is contained in:
parent
bcd112aa4d
commit
d35ec2f3c7
|
|
@ -51,7 +51,7 @@ public class BlackListActivity extends BaseActivity implements AppAdapter.Callba
|
|||
}
|
||||
setupWindowInsets(binding.snackbar, binding.recyclerView);
|
||||
final boolean isWhiteListMode = isWhiteListMode();
|
||||
appAdapter = isCompat ? new CompatListAdapter(this, binding) : new BlackListAdapter(this, isWhiteListMode, binding);
|
||||
appAdapter = isCompat ? new CompatListAdapter(this) : new BlackListAdapter(this, isWhiteListMode);
|
||||
appAdapter.setHasStableIds(true);
|
||||
binding.recyclerView.setAdapter(appAdapter);
|
||||
binding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class MainActivity extends BaseActivity implements RepoLoader.RepoListene
|
|||
binding.statusIcon.setImageDrawable(getDrawable(R.drawable.ic_error));
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
new Thread(() -> new BlackListAdapter(getApplicationContext(), AppHelper.isWhiteListMode(), null).generateCheckedList());
|
||||
new Thread(() -> new BlackListAdapter(getApplicationContext(), AppHelper.isWhiteListMode()).generateCheckedList());
|
||||
}
|
||||
|
||||
private int extractIntPart(String str) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.transition.TransitionManager;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
|
|
@ -158,7 +157,6 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
|
|||
}
|
||||
});
|
||||
adapter.addAll(showList);
|
||||
TransitionManager.beginDelayedTransition(binding.recyclerView);
|
||||
adapter.notifyDataSetChanged();
|
||||
moduleUtil.updateModulesList(false);
|
||||
binding.swipeRefreshLayout.setRefreshing(false);
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ public class SettingsActivity extends BaseActivity {
|
|||
prefPretendXposedInstaller.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
boolean enabled = (Boolean) newValue;
|
||||
if (enabled) {
|
||||
new BlackListAdapter(getContext(), AppHelper.isWhiteListMode(), null).generateCheckedList();
|
||||
new BlackListAdapter(getContext(), AppHelper.isWhiteListMode()).generateCheckedList();
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
fos = new FileOutputStream(pretendXposedInstallerFlag.getPath());
|
||||
|
|
@ -533,7 +533,7 @@ public class SettingsActivity extends BaseActivity {
|
|||
prefHideEdXposedManager.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
boolean enabled = (Boolean) newValue;
|
||||
if (enabled) {
|
||||
new BlackListAdapter(getContext(), AppHelper.isWhiteListMode(), null).generateCheckedList();
|
||||
new BlackListAdapter(getContext(), AppHelper.isWhiteListMode()).generateCheckedList();
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
fos = new FileOutputStream(hideEdXposedManagerFlag.getPath());
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@ import android.widget.TextView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.transition.TransitionManager;
|
||||
|
||||
import org.meowcat.edxposed.manager.R;
|
||||
import org.meowcat.edxposed.manager.XposedApp;
|
||||
import org.meowcat.edxposed.manager.databinding.ActivityBlackListBinding;
|
||||
import org.meowcat.edxposed.manager.util.InstallApkUtil;
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
|
@ -44,11 +42,9 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> impl
|
|||
private PackageManager pm;
|
||||
private ApplicationFilter filter;
|
||||
private Comparator<ApplicationInfo> cmp;
|
||||
private ActivityBlackListBinding binding;
|
||||
|
||||
AppAdapter(Context context, ActivityBlackListBinding binding) {
|
||||
AppAdapter(Context context) {
|
||||
this.context = context;
|
||||
this.binding = binding;
|
||||
fullList = showList = Collections.emptyList();
|
||||
checkedList = Collections.emptyList();
|
||||
filter = new ApplicationFilter();
|
||||
|
|
@ -276,7 +272,6 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> impl
|
|||
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
TransitionManager.beginDelayedTransition(binding.recyclerView);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import android.widget.CompoundButton;
|
|||
|
||||
import org.meowcat.edxposed.manager.R;
|
||||
import org.meowcat.edxposed.manager.XposedApp;
|
||||
import org.meowcat.edxposed.manager.databinding.ActivityBlackListBinding;
|
||||
import org.meowcat.edxposed.manager.util.ModuleUtil;
|
||||
import org.meowcat.edxposed.manager.util.ToastUtil;
|
||||
|
||||
|
|
@ -19,8 +18,8 @@ public class BlackListAdapter extends AppAdapter {
|
|||
private volatile boolean isWhiteListMode;
|
||||
private List<String> checkedList;
|
||||
|
||||
public BlackListAdapter(Context context, boolean isWhiteListMode, ActivityBlackListBinding binding) {
|
||||
super(context, binding);
|
||||
public BlackListAdapter(Context context, boolean isWhiteListMode) {
|
||||
super(context);
|
||||
this.isWhiteListMode = isWhiteListMode;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import android.content.pm.ApplicationInfo;
|
|||
import android.widget.CompoundButton;
|
||||
|
||||
import org.meowcat.edxposed.manager.R;
|
||||
import org.meowcat.edxposed.manager.databinding.ActivityBlackListBinding;
|
||||
import org.meowcat.edxposed.manager.util.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,8 +13,8 @@ public class CompatListAdapter extends AppAdapter {
|
|||
|
||||
private List<String> checkedList;
|
||||
|
||||
public CompatListAdapter(Context context, ActivityBlackListBinding binding) {
|
||||
super(context, binding);
|
||||
public CompatListAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue