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

Commit d2bfab8

Browse files
Various fixes
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 3ba8f4b commit d2bfab8

File tree

4 files changed

+203
-257
lines changed

4 files changed

+203
-257
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.fox2code.mmm.androidacy;
22

33
import android.content.SharedPreferences;
4+
import android.database.sqlite.SQLiteDatabase;
45
import android.os.Looper;
56
import android.util.Log;
67
import android.widget.Toast;
@@ -57,12 +58,8 @@ public final class AndroidacyRepoData extends RepoData {
5758

5859
public AndroidacyRepoData(File cacheRoot, SharedPreferences cachedPreferences, boolean testMode) {
5960
super(testMode ? RepoManager.ANDROIDACY_TEST_MAGISK_REPO_ENDPOINT : RepoManager.ANDROIDACY_MAGISK_REPO_ENDPOINT, cacheRoot, cachedPreferences);
60-
if (this.metaDataCache.exists() && !testMode) {
61-
this.androidacyBlockade = this.metaDataCache.lastModified() + 30_000L;
62-
if (this.androidacyBlockade - 60_000L > System.currentTimeMillis()) {
63-
this.androidacyBlockade = 0; // Don't allow time travel. // Well why not???
64-
}
65-
}
61+
// make sure the metadata db exists
62+
SQLiteDatabase.openOrCreateDatabase(new File(cacheRoot, "modules.db"), null);
6663
this.defaultName = "Androidacy Modules Repo";
6764
this.defaultWebsite = RepoManager.ANDROIDACY_MAGISK_REPO_HOMEPAGE;
6865
this.defaultSupport = "https://t.me/androidacy_discussions";
@@ -330,9 +327,6 @@ protected List<RepoModule> populate(JSONObject jsonObject) throws JSONException,
330327
String config = jsonObject.optString("config", "");
331328
moduleInfo.config = config.isEmpty() ? null : config;
332329
PropUtils.applyFallbacks(moduleInfo); // Apply fallbacks
333-
// Log.i(TAG,
334-
// "Module " + moduleInfo.name + " " + moduleInfo.id + " " + moduleInfo
335-
// .version + " " + moduleInfo.versionCode);
336330
}
337331
Iterator<RepoModule> moduleInfoIterator = this.moduleHashMap.values().iterator();
338332
while (moduleInfoIterator.hasNext()) {

app/src/main/java/com/fox2code/mmm/module/ModuleViewAdapter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.graphics.Color;
66
import android.graphics.Typeface;
77
import android.graphics.drawable.Drawable;
8+
import android.util.Log;
89
import android.util.TypedValue;
910
import android.view.LayoutInflater;
1011
import android.view.View;
@@ -21,6 +22,7 @@
2122
import androidx.recyclerview.widget.RecyclerView;
2223

2324
import com.fox2code.foxcompat.FoxDisplay;
25+
import com.fox2code.mmm.BuildConfig;
2426
import com.fox2code.mmm.MainApplication;
2527
import com.fox2code.mmm.NotificationType;
2628
import com.fox2code.mmm.R;
@@ -373,7 +375,10 @@ public boolean update(ModuleHolder moduleHolder) {
373375
String themeName = theme.toString();
374376
if (theme.getResources().getBoolean(R.bool.force_transparency) ||
375377
themeName.contains("transparent")) {
376-
bgColor = ColorUtils.setAlphaComponent(bgColor, 0x80);
378+
if (BuildConfig.DEBUG) {
379+
Log.d("NoodleDebug", "Theme is transparent, fixing bgColor");
380+
}
381+
bgColor = ColorUtils.setAlphaComponent(bgColor, 0x70);
377382
}
378383
this.titleText.setTextColor(fgColor);
379384
this.buttonAction.setColorFilter(fgColor);

0 commit comments

Comments
 (0)