Skip to content

Commit 79e8164

Browse files
Fixed release build,
Removed some unused files and methods, Deprecated shit
1 parent 99c467b commit 79e8164

32 files changed

+388
-764
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ dependencies {
184184
implementation(platform(libs.androidx.compose.bom))
185185
implementation(libs.androidx.compose.activity)
186186
implementation(libs.compose.ui)
187-
debugImplementation(libs.androidx.compose.ui.tooling)
187+
implementation(libs.androidx.compose.ui.tooling)
188188
implementation(libs.androidx.compose.material)
189189
implementation(libs.androidx.navigation.compose)
190190
implementation(libs.compose.tv.material)

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@
184184
android:windowSoftInputMode="adjustPan"
185185
android:exported="false" />
186186

187-
<activity
188-
android:name=".ui.activity.settings.ExperimentsActivity"
189-
android:windowSoftInputMode="adjustPan"
190-
android:exported="true" />
191-
192187
<activity
193188
android:name=".ui.activity.settings.setup.SetupActivity"
194189
android:windowSoftInputMode="adjustPan"
@@ -227,11 +222,6 @@
227222
android:foregroundServiceType="dataSync"
228223
android:exported="false" />
229224

230-
<service
231-
android:name=".app.services.SubscriptionsService"
232-
android:foregroundServiceType="dataSync"
233-
android:exported="false" />
234-
235225
<service
236226
android:name=".app.services.BackupService"
237227
android:foregroundServiceType="dataSync"

app/src/main/assets/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@
205205

206206
{ "type": "category", "title": "Developers" },
207207
{ "key": "log_network", "type": "boolean", "restart": true, "title": "Verbose network logging" },
208-
{ "key": "experiments", "type": "action", "title": "Experiments" },
209208
{ "key": "start_onboarding", "type": "action", "title": "Start onboarding" },
210209

211210
{ "type": "category", "title": "These buttons are supposed to crash the app. Don't report them!" },

app/src/main/java/com/mrboomdev/awery/app/App.kt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import androidx.room.Room.databaseBuilder
3838
import androidx.viewbinding.ViewBinding
3939
import com.github.piasy.biv.BigImageViewer
4040
import com.github.piasy.biv.loader.glide.GlideCustomImageLoader
41+
import com.google.android.material.color.DynamicColors
4142
import com.google.android.material.color.MaterialColors
4243
import com.google.android.material.progressindicator.CircularProgressIndicator
4344
import com.google.android.material.resources.MaterialAttributes
@@ -518,5 +519,30 @@ class App : Application() {
518519
dialog.window!!.setBackgroundDrawable(null)
519520
return dialog
520521
}
522+
523+
fun isRequirementMet(requirement: String): Boolean {
524+
var requirement = requirement
525+
var invert = false
526+
527+
if(requirement.startsWith("!")) {
528+
invert = true
529+
requirement = requirement.substring(1)
530+
}
531+
532+
val result = when(requirement) {
533+
"material_you" -> DynamicColors.isDynamicColorAvailable()
534+
"tv" -> isTv
535+
"beta" -> BuildConfig.IS_BETA
536+
"debug" -> BuildConfig.DEBUG
537+
"never" -> false
538+
else -> true
539+
}
540+
541+
if(invert) {
542+
return !result
543+
}
544+
545+
return result
546+
}
521547
}
522548
}

app/src/main/java/com/mrboomdev/awery/app/AweryPlatform.java

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

0 commit comments

Comments
 (0)