Skip to content

Commit 1c2dc0c

Browse files
committed
Add user_foreground drawable and update profile photo retrieval logic
1 parent c9b9792 commit 1c2dc0c

File tree

4 files changed

+125
-2
lines changed

4 files changed

+125
-2
lines changed

.claude/settings.local.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebSearch",
5+
"WebFetch(domain:console.groq.com)"
6+
],
7+
"deny": [],
8+
"ask": []
9+
}
10+
}

app/src/main/java/com/wmods/wppenhacer/adapter/IGStatusAdapter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import androidx.annotation.NonNull;
2323
import androidx.annotation.Nullable;
2424

25+
import com.wmods.wppenhacer.R;
2526
import com.wmods.wppenhacer.views.dialog.TabDialogContent;
2627
import com.wmods.wppenhacer.xposed.core.WppCore;
2728
import com.wmods.wppenhacer.xposed.core.components.FMessageWpp;
@@ -168,7 +169,10 @@ public void setInfo(Object item) {
168169
if (Objects.equals(item, "my_status")) {
169170
myStatus = true;
170171
igStatusContactName.setText(UnobfuscatorCache.getInstance().getString("mystatus"));
171-
igStatusContactPhoto.setImageDrawable(WppCore.getMyPhoto());
172+
var profile = WppCore.getMyPhoto();
173+
if (profile == null)
174+
profile = Utils.getApplication().getDrawable(ResId.drawable.user_foreground);
175+
igStatusContactPhoto.setImageDrawable(profile);
172176
setCountStatus(0, 0);
173177
return;
174178
}
@@ -178,7 +182,7 @@ public void setInfo(Object item) {
178182
var contactName = WppCore.getContactName(this.userJid);
179183
igStatusContactName.setText(contactName);
180184
var profile = WppCore.getContactPhotoDrawable(this.userJid.getPhoneRawString());
181-
if (profile == null) profile = DesignUtils.getDrawableByName("avatar_contact");
185+
if (profile == null) profile = Utils.getApplication().getDrawable(ResId.drawable.user_foreground);
182186
igStatusContactPhoto.setImageDrawable(profile);
183187
var countUnseen = XposedHelpers.getIntField(statusInfo, "A01");
184188
var total = XposedHelpers.getIntField(statusInfo, "A00");

app/src/main/java/com/wmods/wppenhacer/xposed/utils/ResId.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public static class drawable {
2020
public static int camera;
2121
public static int edit2;
2222
public static int ic_privacy;
23+
public static int user_foreground;
2324
}
2425

2526
public static class string {
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="464"
5+
android:viewportHeight="464">
6+
<path
7+
android:pathData="M305.87,451.92c-2.42,0.82 -4.85,1.61 -7.3,2.34C301.03,453.52 303.46,452.73 305.87,451.92z"
8+
android:fillColor="#F9EDE0"/>
9+
<path
10+
android:pathData="M317.99,447.47c-2.61,1.04 -5.22,2.06 -7.87,3.01C312.78,449.53 315.39,448.51 317.99,447.47z"
11+
android:fillColor="#F9EDE0"/>
12+
<path
13+
android:pathData="M232,232m-232,0a232,232 0,1 1,464 0a232,232 0,1 1,-464 0"
14+
android:fillColor="#EFECE8"/>
15+
<path
16+
android:pathData="M293.9,455.58c-2.37,0.66 -4.75,1.28 -7.16,1.86C289.14,456.86 291.53,456.24 293.9,455.58z"
17+
android:fillColor="#F9EDE0"/>
18+
<path
19+
android:pathData="M215.19,463.33c-2.83,-0.2 -5.66,-0.42 -8.45,-0.72C209.54,462.91 212.37,463.13 215.19,463.33z"
20+
android:fillColor="#F9EDE0"/>
21+
<path
22+
android:pathData="M177.26,457.44c-2.4,-0.58 -4.78,-1.21 -7.16,-1.86C172.47,456.24 174.86,456.86 177.26,457.44z"
23+
android:fillColor="#F9EDE0"/>
24+
<path
25+
android:pathData="M201.94,462c-2.54,-0.33 -5.06,-0.67 -7.58,-1.08C196.87,461.33 199.41,461.66 201.94,462z"
26+
android:fillColor="#F9EDE0"/>
27+
<path
28+
android:pathData="M232,464c-4.27,0 -8.5,-0.14 -12.72,-0.36C223.5,463.86 227.73,464 232,464z"
29+
android:fillColor="#F9EDE0"/>
30+
<path
31+
android:pathData="M189.42,460.03c-2.43,-0.45 -4.86,-0.93 -7.26,-1.46C184.56,459.1 186.98,459.58 189.42,460.03z"
32+
android:fillColor="#F9EDE0"/>
33+
<path
34+
android:pathData="M142.61,446.13c-3.61,-1.51 -7.18,-3.1 -10.69,-4.78C135.44,443.03 139.01,444.62 142.61,446.13z"
35+
android:fillColor="#F9EDE0"/>
36+
<path
37+
android:pathData="M153.87,450.48c-2.65,-0.95 -5.26,-1.97 -7.87,-3.01C148.61,448.51 151.22,449.53 153.87,450.48z"
38+
android:fillColor="#F9EDE0"/>
39+
<path
40+
android:pathData="M244.72,463.64c-4.22,0.22 -8.45,0.36 -12.72,0.36C236.27,464 240.5,463.86 244.72,463.64z"
41+
android:fillColor="#F9EDE0"/>
42+
<path
43+
android:pathData="M257.26,462.61c-2.8,0.3 -5.62,0.52 -8.45,0.72C251.63,463.13 254.46,462.91 257.26,462.61z"
44+
android:fillColor="#F9EDE0"/>
45+
<path
46+
android:pathData="M281.85,458.58c-2.41,0.53 -4.82,1.01 -7.26,1.46C277.02,459.58 279.44,459.1 281.85,458.58z"
47+
android:fillColor="#F9EDE0"/>
48+
<path
49+
android:pathData="M269.64,460.91c-2.51,0.41 -5.04,0.75 -7.58,1.08C264.59,461.66 267.13,461.33 269.64,460.91z"
50+
android:fillColor="#F9EDE0"/>
51+
<path
52+
android:pathData="M332.03,441.37c-3.5,1.67 -7.05,3.26 -10.64,4.76C324.98,444.62 328.54,443.05 332.03,441.37z"
53+
android:fillColor="#F9EDE0"/>
54+
<path
55+
android:pathData="M165.42,454.26c-2.46,-0.74 -4.88,-1.53 -7.3,-2.34C160.54,452.73 162.97,453.52 165.42,454.26z"
56+
android:fillColor="#F9EDE0"/>
57+
<path
58+
android:pathData="M321.39,446.13c-1.12,0.47 -2.26,0.89 -3.39,1.34C319.12,447.02 320.26,446.6 321.39,446.13z"
59+
android:fillColor="#F9EDE0"/>
60+
<path
61+
android:pathData="M332.35,441.22c-0.1,0.05 -0.22,0.1 -0.32,0.14C332.14,441.32 332.25,441.28 332.35,441.22z"
62+
android:fillColor="#F9EDE0"/>
63+
<path
64+
android:pathData="M182.15,458.58c-1.64,-0.36 -3.27,-0.74 -4.9,-1.13C178.88,457.84 180.51,458.22 182.15,458.58z"
65+
android:fillColor="#F9EDE0"/>
66+
<path
67+
android:pathData="M194.36,460.91c-1.66,-0.27 -3.3,-0.58 -4.95,-0.88C191.06,460.34 192.7,460.65 194.36,460.91z"
68+
android:fillColor="#F9EDE0"/>
69+
<path
70+
android:pathData="M219.28,463.64c-1.37,-0.07 -2.73,-0.22 -4.09,-0.31C216.56,463.42 217.91,463.57 219.28,463.64z"
71+
android:fillColor="#F9EDE0"/>
72+
<path
73+
android:pathData="M206.74,462.61c-1.61,-0.18 -3.2,-0.4 -4.8,-0.61C203.54,462.21 205.14,462.43 206.74,462.61z"
74+
android:fillColor="#F9EDE0"/>
75+
<path
76+
android:pathData="M131.93,441.35c-0.09,-0.04 -0.18,-0.08 -0.27,-0.12C131.74,441.27 131.84,441.31 131.93,441.35z"
77+
android:fillColor="#F9EDE0"/>
78+
<path
79+
android:pathData="M248.81,463.33c-1.37,0.1 -2.72,0.24 -4.09,0.31C246.09,463.57 247.44,463.42 248.81,463.33z"
80+
android:fillColor="#F9EDE0"/>
81+
<path
82+
android:pathData="M298.58,454.26c-1.55,0.46 -3.11,0.9 -4.68,1.33C295.46,455.15 297.02,454.72 298.58,454.26z"
83+
android:fillColor="#F9EDE0"/>
84+
<path
85+
android:pathData="M310.13,450.48c-1.41,0.5 -2.83,0.96 -4.25,1.44C307.3,451.44 308.72,450.98 310.13,450.48z"
86+
android:fillColor="#F9EDE0"/>
87+
<path
88+
android:pathData="M146.01,447.47c-1.13,-0.45 -2.27,-0.87 -3.39,-1.34C143.74,446.6 144.88,447.02 146.01,447.47z"
89+
android:fillColor="#F9EDE0"/>
90+
<path
91+
android:pathData="M158.13,451.92c-1.42,-0.48 -2.85,-0.94 -4.25,-1.44C155.28,450.98 156.7,451.44 158.13,451.92z"
92+
android:fillColor="#F9EDE0"/>
93+
<path
94+
android:pathData="M262.06,462c-1.6,0.21 -3.19,0.44 -4.8,0.61C258.86,462.43 260.46,462.21 262.06,462z"
95+
android:fillColor="#F9EDE0"/>
96+
<path
97+
android:pathData="M286.74,457.44c-1.62,0.39 -3.26,0.77 -4.9,1.13C283.49,458.22 285.12,457.84 286.74,457.44z"
98+
android:fillColor="#F9EDE0"/>
99+
<path
100+
android:pathData="M274.58,460.03c-1.65,0.3 -3.29,0.62 -4.95,0.88C271.3,460.65 272.94,460.34 274.58,460.03z"
101+
android:fillColor="#F9EDE0"/>
102+
<path
103+
android:pathData="M170.1,455.58c-1.56,-0.43 -3.13,-0.86 -4.68,-1.33C166.98,454.72 168.54,455.15 170.1,455.58z"
104+
android:fillColor="#F9EDE0"/>
105+
<path
106+
android:pathData="M285.1,247.95C310.95,230.74 328,201.38 328,168c0,-53.02 -42.98,-96 -96,-96s-96,42.98 -96,96c0,33.38 17.05,62.74 42.9,79.95c0,0 0.01,0.01 0.02,0.01c-0.01,0 -0.01,-0.01 -0.01,-0.01c-61.87,18.65 -110.05,68.86 -125.56,132.04L53.35,380c2.53,3.05 5.15,6.02 7.83,8.94c0.65,0.71 1.33,1.39 1.99,2.09c2.06,2.19 4.15,4.35 6.3,6.46c0.89,0.87 1.79,1.71 2.7,2.57c1.98,1.89 3.99,3.75 6.04,5.57c1.02,0.9 2.05,1.78 3.07,2.66c2.01,1.72 4.04,3.41 6.11,5.06c1.09,0.87 2.18,1.73 3.28,2.58c2.1,1.62 4.22,3.18 6.38,4.72c1.11,0.79 2.21,1.6 3.34,2.38c2.27,1.57 4.58,3.07 6.91,4.56c1.05,0.66 2.07,1.35 3.13,2.01c2.69,1.66 5.42,3.24 8.18,4.79c0.73,0.41 1.44,0.85 2.18,1.25c3.57,1.95 7.19,3.82 10.87,5.59c0.09,0.04 0.18,0.08 0.27,0.12c3.51,1.68 7.08,3.27 10.69,4.78c1.12,0.47 2.26,0.89 3.39,1.34c2.61,1.04 5.22,2.06 7.87,3.01c1.41,0.5 2.83,0.96 4.25,1.44c2.42,0.82 4.85,1.61 7.3,2.34c1.55,0.46 3.11,0.9 4.68,1.33c2.37,0.66 4.75,1.28 7.16,1.86c1.62,0.39 3.26,0.77 4.9,1.13c2.41,0.53 4.82,1.01 7.26,1.46c1.65,0.3 3.29,0.62 4.95,0.88c2.51,0.41 5.04,0.75 7.58,1.08c1.6,0.21 3.19,0.44 4.8,0.61c2.8,0.3 5.62,0.52 8.45,0.72c1.37,0.1 2.72,0.24 4.09,0.31c4.22,0.24 8.45,0.38 12.72,0.38s8.5,-0.14 12.72,-0.36c1.37,-0.07 2.73,-0.22 4.09,-0.31c2.83,-0.2 5.66,-0.42 8.45,-0.72c1.61,-0.18 3.2,-0.4 4.8,-0.61c2.54,-0.33 5.06,-0.67 7.58,-1.08c1.66,-0.27 3.3,-0.58 4.95,-0.88c2.43,-0.45 4.86,-0.93 7.26,-1.46c1.64,-0.36 3.27,-0.74 4.9,-1.13c2.4,-0.58 4.78,-1.21 7.16,-1.86c1.56,-0.43 3.13,-0.86 4.68,-1.33c2.46,-0.74 4.88,-1.53 7.3,-2.34c1.42,-0.48 2.85,-0.94 4.25,-1.44c2.65,-0.95 5.26,-1.97 7.87,-3.01c1.13,-0.45 2.27,-0.87 3.39,-1.34c3.59,-1.5 7.14,-3.08 10.64,-4.76c0.1,-0.05 0.22,-0.1 0.32,-0.14c3.68,-1.77 7.3,-3.64 10.87,-5.59c0.74,-0.4 1.45,-0.84 2.18,-1.25c2.76,-1.55 5.5,-3.14 8.18,-4.79c1.06,-0.65 2.09,-1.34 3.13,-2.01c2.33,-1.49 4.64,-3 6.91,-4.56c1.12,-0.78 2.22,-1.58 3.34,-2.38c2.15,-1.54 4.28,-3.11 6.38,-4.72c1.1,-0.85 2.19,-1.71 3.28,-2.58c2.06,-1.65 4.1,-3.34 6.11,-5.06c1.03,-0.88 2.06,-1.77 3.07,-2.66c2.05,-1.82 4.06,-3.68 6.04,-5.57c0.9,-0.86 1.81,-1.7 2.7,-2.57c2.14,-2.11 4.24,-4.27 6.3,-6.46c0.66,-0.7 1.34,-1.38 1.99,-2.09c2.68,-2.92 5.3,-5.9 7.83,-8.94l0.01,-0.01C395.15,316.82 346.98,266.6 285.1,247.95z"
107+
android:fillColor="#C6C3BD"/>
108+
</vector>

0 commit comments

Comments
 (0)