Skip to content

Commit 424ed2b

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents dcd8c37 + 7523416 commit 424ed2b

File tree

6 files changed

+30
-12
lines changed

6 files changed

+30
-12
lines changed

.github/workflows/android.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ jobs:
5959
fi
6060
6161
- name: Upload to release
62-
uses: svenstaro/upload-release-action@v2
62+
uses: softprops/action-gh-release@v2
6363
with:
64-
repo_token: ${{ secrets.GITHUB_TOKEN }}
65-
file: app/build/outputs/apk/debug/app-debug.apk
66-
asset_name: WaEnhancer_debug_${{ github.sha }}.apk
67-
tag: pre-release-${{ github.sha }}
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
name: WaEnhancer ${{ github.sha }}
66+
body_path: changelog.txt
67+
files: app/build/outputs/apk/debug/app-debug.apk
68+
tag_name: pre-release-${{ github.sha }}

.github/workflows/business.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ jobs:
5050
path: app/build/outputs/apk/debug/app-debug.apk
5151

5252
- name: Upload to release
53-
uses: svenstaro/upload-release-action@v2
53+
uses: softprops/action-gh-release@v2
5454
with:
55-
repo_token: ${{ secrets.GITHUB_TOKEN }}
56-
file: app/build/outputs/apk/debug/app-debug.apk
57-
asset_name: WaEnhancer_business_debug_${{ github.sha }}.apk
58-
tag: pre-release-business-${{ github.sha }}
55+
token: ${{ secrets.GITHUB_TOKEN }}
56+
name: WaEnhancer Business ${{ github.sha }}
57+
body_path: changelog.txt
58+
files: app/build/outputs/apk/debug/app-debug.apk
59+
tag_name: pre-release-business-${{ github.sha }}

app/src/main/java/com/wmods/wppenhacer/ui/fragments/base/BasePreferenceFragment.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ private boolean checkStoragePermission(Object newValue) {
103103

104104
@SuppressLint("ApplySharedPref")
105105
private void chanceStates(String key) {
106+
107+
var update_check = mPrefs.getBoolean("update_check", true);
108+
setPreferenceState("update_check", update_check);
106109

107110
var lite_mode = mPrefs.getBoolean("lite_mode", false);
108111

app/src/main/java/com/wmods/wppenhacer/xposed/core/FeatureLoader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ private static void initComponents(ClassLoader loader, XSharedPreferences pref)
187187
checkUpdate(activity);
188188
}
189189

190-
// Check for Update
191-
if (App.isOriginalPackage()) {
190+
// Check for WAE Update
191+
if (App.isOriginalPackage() && pref.getBoolean("update_check", true)) {
192192
if (activity.getClass().getSimpleName().equals("HomeActivity") && state == WppCore.ActivityChangeState.ChangeType.START) {
193193
CompletableFuture.runAsync(new UpdateChecker(activity));
194194
}

app/src/main/res/values/strings.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,13 @@
405405
<string name="download_folder_permission">Download Folder Permission</string>
406406
<string name="lite_mode">Lite Mode</string>
407407
<string name="lite_mode_sum">Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off.</string>
408+
<string name="update_check">Automatically Check for Update</string>
409+
<string name="update_check_sum">
410+
Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n
411+
<font color="#FFFF0000">
412+
WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE'S A NEW UPDATE, USE THIS CAREFULLY AND DON'T REPORT ISSUE IF YOU'RE USING OUTDATED VERSION!
413+
</font>
414+
</string>
408415
<string name="change_default_dpi">Change Default DPI</string>
409416
<string name="change_default_dpi_sum">Change the DPI setting for the application. Use 0 to reset to default.</string>
410417
</resources>

app/src/main/res/xml/preference_general_home.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
app:key="thememode"
1212
app:summary="%s"
1313
app:title="@string/theme_mode" />
14+
15+
<rikka.material.preference.MaterialSwitchPreference
16+
app:key="update_check"
17+
app:defaultValue="true"
18+
app:summary="@string/update_check_sum"
19+
app:title="@string/update_check" />
1420

1521
<rikka.material.preference.MaterialSwitchPreference
1622
app:key="lite_mode"

0 commit comments

Comments
 (0)