diff --git a/app/src/main/java/foundation/e/apps/MainActivity.kt b/app/src/main/java/foundation/e/apps/MainActivity.kt
index 88496dfac5bede91c4e74d703e19753981edfcf9..cedbf9c84787f3f0c0431d89429520e441ab37f5 100644
--- a/app/src/main/java/foundation/e/apps/MainActivity.kt
+++ b/app/src/main/java/foundation/e/apps/MainActivity.kt
@@ -372,9 +372,11 @@ class MainActivity : AppCompatActivity() {
}
private fun broadcastGPlayLogin() {
+ val user = viewModel.getUser().name
+ Timber.d("Sending broadcast with login type - $user")
val intent = Intent(Constants.ACTION_PARENTAL_CONTROL_APP_LOUNGE_LOGIN).apply {
setPackage(BuildConfig.PACKAGE_NAME_PARENTAL_CONTROL)
- putExtra(COLUMN_LOGIN_TYPE, viewModel.getUser().name)
+ putExtra(COLUMN_LOGIN_TYPE, user)
}
sendBroadcast(intent)
}
diff --git a/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorApi.kt b/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorApi.kt
new file mode 100644
index 0000000000000000000000000000000000000000..ed9de21855f501612e93f2c589075bfb14aae431
--- /dev/null
+++ b/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorApi.kt
@@ -0,0 +1,34 @@
+/*
+ * Copyright MURENA SAS 2024
+ * Apps Quickly and easily install Android apps onto your device!
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package foundation.e.apps.data.ageRating
+
+import retrofit2.Response
+import retrofit2.http.GET
+
+interface FDroidMonitorApi {
+
+ companion object {
+ const val BASE_URL = "https://f-droid.org/repo/"
+ }
+
+ @GET("status/update.json")
+ suspend fun getMonitorData(): Response
+
+}
diff --git a/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorData.kt b/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorData.kt
new file mode 100644
index 0000000000000000000000000000000000000000..762e6021335de4b761d2aa42a79f6dfe61d7227b
--- /dev/null
+++ b/app/src/main/java/foundation/e/apps/data/ageRating/FDroidMonitorData.kt
@@ -0,0 +1,36 @@
+/*
+ * Copyright MURENA SAS 2024
+ * Apps Quickly and easily install Android apps onto your device!
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package foundation.e.apps.data.ageRating
+
+import com.squareup.moshi.Json
+
+data class FDroidMonitorData(
+ val antiFeatures: AntiFeatures
+) {
+ fun getNSFWApps() = antiFeatures.nsfw.apps
+}
+
+data class AntiFeatures(
+ @Json(name = "NSFW") val nsfw: NSFW
+)
+
+data class NSFW(
+ val apps: List
+)
diff --git a/app/src/main/java/foundation/e/apps/data/application/data/Application.kt b/app/src/main/java/foundation/e/apps/data/application/data/Application.kt
index 98d8d56c9b2780c6718271ed10d6222b3260ec75..2ff78b9473eacf42ad59184d1062e3bd9c4622a4 100644
--- a/app/src/main/java/foundation/e/apps/data/application/data/Application.kt
+++ b/app/src/main/java/foundation/e/apps/data/application/data/Application.kt
@@ -102,7 +102,9 @@ data class Application(
var isGplayReplaced: Boolean = false,
@SerializedName(value = "on_fdroid")
val isFDroidApp: Boolean = false,
- var contentRating: ContentRating = ContentRating()
+ var contentRating: ContentRating = ContentRating(),
+ @SerializedName(value = "antifeatures")
+ val antiFeatures: List