Skip to content

Commit

Permalink
Fix scope of XSharedPreferences
Browse files Browse the repository at this point in the history
  • Loading branch information
Chipppppppppp committed Feb 29, 2024
1 parent 8f5effd commit f97a651
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/io/github/chipppppppppp/lime/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ public class Main implements IXposedHookLoadPackage, IXposedHookInitPackageResou
"com.linecorp.square.v2.view.ad.common.SquareCommonHeaderGoogleNativeAdView",
};

XSharedPreferences xModulePrefs;
XSharedPreferences xPackagePrefs;
XSharedPreferences xPrefs;
public LimeOptions limeOptions = new LimeOptions();
public boolean keepUnread = false;

public void handleLoadPackage(@NonNull XC_LoadPackage.LoadPackageParam lparam) throws Throwable {
if (!lparam.packageName.equals(PACKAGE)) return;

final XSharedPreferences xModulePrefs = new XSharedPreferences(MODULE, "options");
final XSharedPreferences xPackagePrefs = new XSharedPreferences(PACKAGE, MODULE + "-options");
XSharedPreferences xPrefs;
xModulePrefs = new XSharedPreferences(MODULE, "options");
xPackagePrefs = new XSharedPreferences(PACKAGE, MODULE + "-options");
if (xModulePrefs.getBoolean("unembed_options", false)) {
xPrefs = xModulePrefs;
} else {
Expand Down

0 comments on commit f97a651

Please sign in to comment.