This commit is contained in:
Koitharu
2025-03-18 07:36:42 +02:00
parent 6282d25d3d
commit f1ab65ec32
4 changed files with 13 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ interface AppModule {
@Provides
@Singleton
fun provideCoil(
@ApplicationContext context: Context,
@LocalizedAppContext context: Context,
@MangaHttpClient okHttpClientProvider: Provider<OkHttpClient>,
mangaRepositoryFactory: MangaRepository.Factory,
imageProxyInterceptor: ImageProxyInterceptor,

View File

@@ -569,7 +569,10 @@ class AppSettings @Inject constructor(@ApplicationContext context: Context) {
fun getAllValues(): Map<String, *> = prefs.all
fun upsertAll(m: Map<String, *>) = prefs.edit { putAll(m) }
fun upsertAll(m: Map<String, *>) = prefs.edit {
clear()
putAll(m)
}
private fun isBackgroundNetworkRestricted(): Boolean {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {

View File

@@ -48,7 +48,10 @@ class TapGridSettings @Inject constructor(@ApplicationContext context: Context)
fun getAllValues(): Map<String, *> = prefs.all
fun upsertAll(m: Map<String, *>) = prefs.edit { putAll(m) }
fun upsertAll(m: Map<String, *>) = prefs.edit {
clear()
putAll(m)
}
private fun initPrefs(withDefaultValues: Boolean) {
prefs.edit {

View File

@@ -95,11 +95,14 @@ class MangaDirectoriesActivity : BaseActivity<ActivityMangaDirectoriesBinding>()
leftMargin = topMargin + barsInsets.left
bottomMargin = topMargin + barsInsets.bottom
}
viewBinding.root.updatePadding(
viewBinding.appbar.updatePadding(
left = barsInsets.left,
right = barsInsets.right,
top = barsInsets.top,
)
viewBinding.recyclerView.updatePadding(
left = barsInsets.left,
right = barsInsets.right,
bottom = barsInsets.bottom,
)
return insets.consumeAllSystemBarsInsets()