This commit is contained in:
rebelonion 2024-01-25 12:00:00 +00:00
parent 0ebd067bc2
commit 73be639397
10 changed files with 40 additions and 28 deletions

View file

@ -61,7 +61,8 @@ class SearchAdapter(private val activity: SearchActivity) :
binding.searchBar.hint = activity.result.type
if (currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
?.getBoolean("incognito", false ) == true){
?.getBoolean("incognito", false) == true
) {
val startIconDrawableRes = R.drawable.ic_incognito_24
val startIconDrawable: Drawable? =
context?.let { AppCompatResources.getDrawable(it, startIconDrawableRes) }

View file

@ -1323,7 +1323,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
}
dataSource
}
val dafuckDataSourceFactory = DefaultDataSourceFactory(this, Util.getUserAgent(this, R.string.app_name.toString()))
val dafuckDataSourceFactory =
DefaultDataSourceFactory(this, Util.getUserAgent(this, R.string.app_name.toString()))
cacheFactory = CacheDataSource.Factory().apply {
setCache(Helper.getSimpleCache(this@ExoplayerView))
if (ext.server.offline) {
@ -1745,7 +1746,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
private fun updateAniProgress() {
val incognito = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
?.getBoolean("incognito", false) ?: false
?.getBoolean("incognito", false) ?: false
if (!incognito && exoPlayer.currentPosition / episodeLength > settings.watchPercentage && Anilist.userid != null)
if (loadData<Boolean>("${media.id}_save_progress") != false && if (media.isAdult) settings.updateForH else true) {
media.anime!!.selectedEpisode?.apply {

View file

@ -219,7 +219,10 @@ class MangaReaderActivity : AppCompatActivity() {
val mangaSources = MangaSources
val scope = lifecycleScope
scope.launch(Dispatchers.IO) {
mangaSources.init(Injekt.get<MangaExtensionManager>().installedExtensionsFlow, this@MangaReaderActivity)
mangaSources.init(
Injekt.get<MangaExtensionManager>().installedExtensionsFlow,
this@MangaReaderActivity
)
}
model.mangaReadSources = mangaSources
} else {