Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit a5cd1da

Browse files
Tweaks, fixes, and kittens
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 482a4d2 commit a5cd1da

File tree

6 files changed

+12
-33
lines changed

6 files changed

+12
-33
lines changed

app/build.gradle

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ android {
1515
Properties properties = new Properties()
1616
if (project.rootProject.file('local.properties').exists()) {
1717
properties.load(project.rootProject.file('local.properties').newDataInputStream())
18-
// AndroidStudio generate local.properties, only set values if file is defined.
19-
if (properties.hasProperty('keystore.file')) {
20-
storeFile file(properties.getProperty('keystore.file'))
21-
storePassword properties.getProperty('keystore.password')
22-
keyAlias 'key0'
23-
keyPassword properties.getProperty('keystore.password')
24-
}
18+
// FFS DO NOT CHANGE THIS, IT WILL BREAK THE BUILD
19+
storeFile file(properties.getProperty('keystore.file'))
20+
storePassword properties.getProperty('keystore.password')
21+
keyAlias 'key0'
22+
keyPassword properties.getProperty('keystore.password')
2523
}
2624
}
2725
}
@@ -30,8 +28,8 @@ android {
3028
applicationId "com.fox2code.mmm"
3129
minSdk 23
3230
targetSdk 33
33-
versionCode 61
34-
versionName "1.0.1"
31+
versionCode 62
32+
versionName "1.0.2"
3533
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3634
signingConfig signingConfigs.release
3735
}
@@ -89,9 +87,7 @@ android {
8987
}
9088
buildConfigField "String", "SENTRY_TOKEN", '"' + properties.getProperty("auth." + "token") + '"'
9189
} else {
92-
9390
buildConfigField "String", "SENTRY_TOKEN", '""'
94-
9591
}
9692
// Get the androidacy client ID from the androidacy.properties
9793
Properties properties = new Properties()
@@ -289,9 +285,6 @@ dependencies {
289285
// Test
290286
testImplementation 'junit:junit:4.13.2'
291287
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
292-
293-
// Add okhttp logging interceptor if debug build
294-
debugImplementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10'
295288
}
296289

297290
if (hasSentryConfig) {

app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ static boolean isAndroidacyLink(@NonNull String url,@NonNull Uri uri) {
2222
int i; // Check both string and Uri to mitigate parse exploit
2323
return url.startsWith("https://") &&
2424
(i = url.indexOf("/", 8)) != -1 &&
25-
url.substring(8, i).endsWith(".androidacy.com") &&
26-
uri.getHost().endsWith(".androidacy.com");
25+
url.substring(8, i).endsWith("api.androidacy.com") &&
26+
uri.getHost().endsWith("api.androidacy.com");
2727
}
2828

2929
public static boolean isAndroidacyFileUrl(@Nullable String url) {
@@ -68,7 +68,7 @@ public static String getModuleId(String moduleUrl) {
6868
// URL decode
6969
moduleId = Uri.decode(moduleId);
7070
// Strip non alphanumeric
71-
moduleId = moduleId.replaceAll("[^a-zA-Z0-9]", "");
71+
moduleId = moduleId.replaceAll("[^a-zA-Z\\d]", "");
7272
return moduleId;
7373
}
7474
if (BuildConfig.DEBUG) {

app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -959,11 +959,7 @@ private void setRepoData(final RepoData repoData, String preferenceName) {
959959
if (!homepage.isEmpty()) {
960960
preference.setVisible(true);
961961
preference.setOnPreferenceClickListener(p -> {
962-
if (homepage.startsWith("https://www.androidacy.com/")) {
963-
IntentHelper.openUrlAndroidacy(getFoxActivity(this), homepage, true);
964-
} else {
965-
IntentHelper.openUrl(getFoxActivity(this), homepage);
966-
}
962+
IntentHelper.openUrl(getFoxActivity(this), homepage);
967963
return true;
968964
});
969965
((LongClickablePreference) preference).setOnPreferenceLongClickListener(p -> {

app/src/main/res/layout/setup_box.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="fill" android:orientation="vertical" android:paddingLeft="20dp" android:paddingRight="20dp" android:scrollbars="vertical">
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="fill" android:orientation="vertical" android:paddingLeft="20dp" android:paddingRight="20dp" android:scrollbars="vertical">
33

44
<com.google.android.material.textview.MaterialTextView
55
android:layout_width="wrap_content"

app/src/main/res/values-night-v31/strings.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)