mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-29 22:01:07 +00:00
feat: F-Droid flavor
This commit is contained in:
@@ -5,6 +5,7 @@ import androidx.fragment.app.FragmentActivity
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import ani.dantotsu.BuildConfig
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.connections.discord.Discord
|
||||
import ani.dantotsu.connections.mal.MAL
|
||||
@@ -100,7 +101,9 @@ class AnilistHomeViewModel : ViewModel() {
|
||||
Anilist.getSavedToken()
|
||||
MAL.getSavedToken(context)
|
||||
Discord.getSavedToken(context)
|
||||
if (PrefManager.getVal(PrefName.CheckUpdate)) AppUpdater.check(context)
|
||||
if (!BuildConfig.FLAVOR.contains("fdroid")) {
|
||||
if (PrefManager.getVal(PrefName.CheckUpdate)) AppUpdater.check(context)
|
||||
}
|
||||
genres.postValue(Anilist.query.getGenresAndTags(context))
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package ani.dantotsu.connections.crashlytics
|
||||
|
||||
interface CrashlyticsInterface {
|
||||
fun logException(e: Throwable)
|
||||
fun log(message: String)
|
||||
fun setUserId(id: String)
|
||||
fun setCustomKey(key: String, value: String)
|
||||
fun setCrashlyticsCollectionEnabled(enabled: Boolean)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package ani.dantotsu.connections.crashlytics
|
||||
|
||||
class CrashlyticsStub : CrashlyticsInterface {
|
||||
override fun logException(e: Throwable) {
|
||||
//no-op
|
||||
}
|
||||
|
||||
override fun log(message: String) {
|
||||
//no-op
|
||||
}
|
||||
|
||||
override fun setUserId(id: String) {
|
||||
//no-op
|
||||
}
|
||||
|
||||
override fun setCustomKey(key: String, value: String) {
|
||||
//no-op
|
||||
}
|
||||
|
||||
override fun setCrashlyticsCollectionEnabled(enabled: Boolean) {
|
||||
//no-op
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user