From 75a2110626d95eb86b6eb2011e2f6781588234df Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 31 Jan 2022 18:13:57 -0500 Subject: [PATCH] Update preference dependencies --- app/build.gradle.kts | 4 ++-- .../eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 +- .../ui/browse/source/browse/BrowseSourceController.kt | 2 +- .../eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt | 2 +- .../java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt | 4 ++-- .../kanade/tachiyomi/util/preference/PreferenceExtensions.kt | 2 +- .../java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c1a5c1340d..8bae2d061f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -208,8 +208,8 @@ dependencies { implementation("com.github.requery:sqlite-android:3.36.0") // Preferences - implementation("androidx.preference:preference-ktx:1.2.0-rc01") - implementation("com.github.tfcporciuncula.flow-preferences:flow-preferences:1.4.0") + implementation("androidx.preference:preference-ktx:1.2.0") + implementation("com.fredporciuncula:flow-preferences:1.6.0") // Model View Presenter val nucleusVersion = "3.0.0" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 8c3740c789..e1861bd103 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -6,7 +6,7 @@ import android.os.Environment import androidx.core.content.edit import androidx.core.net.toUri import androidx.preference.PreferenceManager -import com.tfcporciuncula.flow.FlowSharedPreferences +import com.fredporciuncula.flow.preferences.FlowSharedPreferences import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.track.TrackService diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index 2b0ebbe096..b82f8b6dc1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -13,10 +13,10 @@ import androidx.core.view.updatePadding import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView +import com.fredporciuncula.flow.preferences.Preference import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton import com.google.android.material.snackbar.Snackbar -import com.tfcporciuncula.flow.Preference import dev.chrisbanes.insetter.applyInsetter import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt index 49188ed707..83666ff69e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt @@ -6,7 +6,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT import android.widget.FrameLayout import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.RecyclerView -import com.tfcporciuncula.flow.Preference +import com.fredporciuncula.flow.preferences.Preference import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.AbstractFlexibleItem import eu.davidea.flexibleadapter.items.IFlexible diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 75422e7f41..5d19fcf068 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -11,10 +11,10 @@ import androidx.appcompat.view.ActionMode import androidx.core.view.isVisible import com.bluelinelabs.conductor.ControllerChangeHandler import com.bluelinelabs.conductor.ControllerChangeType +import com.fredporciuncula.flow.preferences.Preference import com.google.android.material.tabs.TabLayout import com.jakewharton.rxrelay.BehaviorRelay import com.jakewharton.rxrelay.PublishRelay -import com.tfcporciuncula.flow.Preference import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Category import eu.kanade.tachiyomi.data.database.models.Manga diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt index e90a49999e..e9bc4a9712 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt @@ -6,7 +6,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT import android.widget.FrameLayout import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.RecyclerView -import com.tfcporciuncula.flow.Preference +import com.fredporciuncula.flow.preferences.Preference import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.AbstractFlexibleItem import eu.davidea.flexibleadapter.items.IFilterable diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt index 79f8b8374a..10e1d9d7f6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt @@ -1,6 +1,6 @@ package eu.kanade.tachiyomi.ui.reader.viewer -import com.tfcporciuncula.flow.Preference +import com.fredporciuncula.flow.preferences.Preference import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode import eu.kanade.tachiyomi.data.preference.PreferencesHelper import kotlinx.coroutines.CoroutineScope diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt index ef82bba701..48c7ec22da 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt @@ -137,7 +137,7 @@ abstract class SettingsController : PreferenceController() { (activity as? AppCompatActivity)?.supportActionBar?.title = getTitle() } - inline fun Preference.visibleIf(preference: com.tfcporciuncula.flow.Preference, crossinline block: (T) -> Boolean) { + inline fun Preference.visibleIf(preference: com.fredporciuncula.flow.preferences.Preference, crossinline block: (T) -> Boolean) { preference.asImmediateFlow { isVisible = block(it) } .launchIn(viewScope) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt index 58b2ea9a31..0b648a137b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt @@ -114,12 +114,12 @@ inline fun

PreferenceGroup.addThenInit(p: P, block: P.() -> Uni } } -inline fun Preference.bindTo(preference: com.tfcporciuncula.flow.Preference) { +inline fun Preference.bindTo(preference: com.fredporciuncula.flow.preferences.Preference) { key = preference.key defaultValue = preference.defaultValue } -inline fun ListPreference.bindTo(preference: com.tfcporciuncula.flow.Preference) { +inline fun ListPreference.bindTo(preference: com.fredporciuncula.flow.preferences.Preference) { key = preference.key // ListPreferences persist values as strings, even when we're using our IntListPreference defaultValue = preference.defaultValue.toString() diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt index 7b004a703e..d9098333e4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceExtensions.kt @@ -1,7 +1,7 @@ package eu.kanade.tachiyomi.util.preference import android.widget.CompoundButton -import com.tfcporciuncula.flow.Preference +import com.fredporciuncula.flow.preferences.Preference import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.onEach diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt index 7ba92ba07c..e9699c524a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt @@ -13,7 +13,7 @@ import androidx.appcompat.view.menu.MenuBuilder import androidx.appcompat.widget.PopupMenu import androidx.core.view.forEach import androidx.core.view.get -import com.tfcporciuncula.flow.Preference +import com.fredporciuncula.flow.preferences.Preference import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.databinding.PrefSpinnerBinding import eu.kanade.tachiyomi.util.system.getResourceColor