diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c1a5c1340..8bae2d061 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 8c3740c78..e1861bd10 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 2b0ebbe09..b82f8b6dc 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 49188ed70..83666ff69 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 75422e7f4..5d19fcf06 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 e90a49999..e9bc4a971 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 79f8b8374..10e1d9d7f 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 ef82bba70..48c7ec22d 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 58b2ea9a3..0b648a137 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 7b004a703..d9098333e 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 7ba92ba07..e9699c524 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