Skip to content

Commit f06111d

Browse files
committed
Fix UI thread safety in contact verify
1 parent d98d80e commit f06111d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/ContactBlockedVerify.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
8989
}
9090
var textView = (TextView) view.findViewById(0x7f990001);
9191
if (textView != null) {
92-
textView.setText(ResId.string.checking_if_the_contact_is_blocked);
93-
textView.setTextColor(DesignUtils.getPrimaryTextColor());
94-
textView.postInvalidate();
92+
textView.post(() -> {
93+
textView.setText(ResId.string.checking_if_the_contact_is_blocked);
94+
textView.setTextColor(DesignUtils.getPrimaryTextColor());
95+
});
9596
} else {
9697
var textView1 = createTextMessageView(activity);
9798
view.post(() -> view.addView(textView1));

0 commit comments

Comments
 (0)