diff --git a/README.md b/README.md index 9674589..ece47bb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ was more painful that trying something while in pain. Spending time with my friend and working on this project was a sort of pain killer for me. -Even tho I received money from my parent and the governement for my health problems, I didn't know +Even tho I received money from my parent and the government for my health problems, I didn't know what to do with it cause anything I could have bought had no use for me because my extreme pain made me unable to use anything (even play video games). @@ -35,8 +35,8 @@ community support I would have been physically unable to continue this project. There was clues of my health problems, right on this project, and theses are the following: - My commit time of day being random proving I have no jobs. -- Me not commiting for entire week, or having only commited one line in a week. -- Me taking too much time to publish release after I did the relase commit. +- Me not committing for entire week, or having only committed one line in a week. +- Me taking too much time to publish release after I did the release commit. - Me missing obvious bugs and being able to do simple task properly (Well maybe this last one is harder to prove via commit history) @@ -45,10 +45,10 @@ analysis to prove what it would make my day, and I would be happy to give money that because I don't know what do to with my money at this point. This is really sickening peoples need to give proof for their mental/health issues because some -peoples fake having thoses issues for clout. +peoples fake having those issues for clout. If you want to use my health problems for clout, I don't care as long as you are respectful, at -least you won't be hurting peoples with mental/health issues by faking having thoses issues. +least you won't be hurting peoples with mental/health issues by faking having those issues. I'll probably delete this section once my health would be gotten better, or at least good enough for me to not be stuck in my bed at least once a day because of pain. diff --git a/app/build.gradle b/app/build.gradle index 03a3f08..ca8023d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,7 +12,7 @@ apply plugin: "realm-android" android { namespace "com.fox2code.mmm" compileSdk 33 - ndkVersion "25.1.8937393" + ndkVersion "25.2.9519653" signingConfigs { release { // Everything comes from local.properties @@ -207,12 +207,11 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } lint { disable 'MissingTranslation' - disable 'TypographyEllipsis' } } @@ -274,7 +273,7 @@ sentry { } // temp fix for gradle bug - includeDependenciesReport = false + includeDependenciesReport = true } configurations { @@ -283,8 +282,9 @@ configurations { dependencies { // UI - implementation 'androidx.appcompat:appcompat:1.6.0' - implementation "androidx.activity:activity-ktx:1.7.0-alpha04" + implementation 'androidx.appcompat:appcompat:1.6.1' + //noinspection GradleDependency + implementation "androidx.activity:activity-ktx:1.7.0-beta01" implementation 'androidx.emoji2:emoji2:1.2.0' implementation 'androidx.emoji2:emoji2-views-helper:1.2.0' implementation 'androidx.preference:preference-ktx:1.2.0' @@ -302,7 +302,7 @@ dependencies { implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}" // Utils - implementation 'androidx.work:work-runtime:2.7.1' + implementation 'androidx.work:work-runtime:2.8.0' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10' implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:5.0.0-alpha.10' // Chromium cronet from androidacy @@ -368,7 +368,7 @@ android { } kotlinOptions { - jvmTarget=JavaVersion.VERSION_11 + jvmTarget=JavaVersion.VERSION_17 } //noinspection GrDeprecatedAPIUsage buildToolsVersion '33.0.1' @@ -378,7 +378,7 @@ android { kotlin { jvmToolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java b/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java index 30d67de..5b05f01 100644 --- a/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java +++ b/app/src/main/java/com/fox2code/mmm/repo/RepoUpdater.java @@ -10,7 +10,6 @@ import org.json.JSONObject; import java.io.File; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -61,11 +60,19 @@ public class RepoUpdater { this.toApply.add(new RepoModule(this.repoData, moduleListCache.getId(), moduleListCache.getName(), moduleListCache.getDescription(), moduleListCache.getAuthor(), moduleListCache.getDonate(), moduleListCache.getConfig(), moduleListCache.getSupport(), moduleListCache.getVersion(), moduleListCache.getVersionCode())); } Timber.d("Fetched %d modules from cache for %s, from %s records", this.toApply.size(), this.repoData.id, results.size()); + // apply the toApply list to the toUpdate list + try { + this.toUpdate = this.repoData.populate(new JSONObject(new String(results.asJSON().getBytes(), StandardCharsets.UTF_8))); + } catch (Exception e) { + Timber.e(e); + } // close realm realm.close(); realm2.close(); - // apply the toApply list to the toUpdate list - this.toUpdate = new ArrayList<>(this.toApply); + // Since we reuse instances this should work + this.toApply = new HashSet<>(this.repoData.moduleHashMap.values()); + this.toApply.removeAll(this.toUpdate); + // Return repo to update return this.toUpdate.size(); } try {