Skip to content

Commit

Permalink
Fix bug in database
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev4Mod committed May 29, 2024
1 parent a5abf0a commit 2dea39b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import com.wmods.wppenhacer.xposed.utils.ReflectionUtils;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -58,7 +56,6 @@
import cz.vutbr.web.css.TermURI;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XSharedPreferences;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;

public class CustomView extends Feature {
Expand All @@ -84,8 +81,8 @@ public void doHook() throws Throwable {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
var activity = (Activity) param.thisObject;
var content = (ViewGroup) activity.findViewById(android.R.id.content);
content.getViewTreeObserver().addOnGlobalLayoutListener(() -> mThreadService.execute(() -> registerCssRules(activity, content, sheet)));
View rootView = activity.getWindow().getDecorView().getRootView();
rootView.getViewTreeObserver().addOnGlobalLayoutListener(() -> mThreadService.execute(() -> registerCssRules(activity, (ViewGroup)rootView, sheet)));
}
});
}
Expand Down Expand Up @@ -183,7 +180,7 @@ private void setRuleInView(RuleItem ruleItem, View view) {
view.setAlpha(value.getValue());
}
case "background-image" -> {
var uri = (TermURI) declaration.get(0);
if (!(declaration.get(0) instanceof TermURI uri))continue;
if (!new File(uri.getValue()).exists()) continue;
var draw = cacheImages.getDrawable(uri.getValue());
if (view instanceof ImageView imageView) {
Expand Down
6 changes: 4 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[WA ENHANCER]
* Fix critical bug in Material Dialog
[SHOW HISTORY EDITED]
* Fix bug in database
[CSS CUSTOM]
* Fix minor bugs

0 comments on commit 2dea39b

Please sign in to comment.