Skip to content

Commit

Permalink
[app] hide XposedScope if xposed service is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornaco committed May 30, 2023
1 parent 00ca332 commit 6d60f6d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import github.tornaco.android.thanos.BuildProp;
import github.tornaco.android.thanos.R;
import github.tornaco.android.thanos.ThanosApp;
import github.tornaco.android.thanos.XposedScope;
import github.tornaco.android.thanos.app.donate.DonateActivity;
import github.tornaco.android.thanos.app.donate.DonateSettings;
import github.tornaco.android.thanos.apps.AppDetailsActivity;
Expand Down Expand Up @@ -204,6 +205,7 @@ private void invalidateIconPack(IconPack pack) {

protected void onBindStrategyPreferences() {
SwitchPreferenceCompat autoXposedScope = findPreference(getString(R.string.key_new_auto_request_xposed_scope));
Objects.requireNonNull(autoXposedScope).setVisible(XposedScope.INSTANCE.getService() != null);
autoXposedScope.setChecked(AppPreference.isAutoRequestXposedScopeEnabled(requireContext()));
autoXposedScope.setOnPreferenceChangeListener((preference, newValue) -> {
AppPreference.setAutoRequestXposedScopeEnabled(requireContext(), (Boolean) newValue);
Expand Down

0 comments on commit 6d60f6d

Please sign in to comment.