1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-09-20 01:59:10 -05:00

Bump preference-ktx from 1.1.1 to 1.2.0 (#1773)

This commit is contained in:
dependabot[bot] 2022-01-29 05:38:55 +00:00 committed by GitHub
parent a4f455b38f
commit ce36e86bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 14 deletions

View File

@ -190,7 +190,7 @@ dependencies {
implementation "androidx.fragment:fragment-ktx:1.4.0"
implementation "androidx.annotation:annotation:1.3.0"
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.preference:preference-ktx:1.2.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

View File

@ -173,8 +173,10 @@ class MainActivity : BaseActivity<MainPresenter, ActivityMainBinding>(), MainVie
caller: PreferenceFragmentCompat,
pref: Preference
): Boolean {
val fragment =
supportFragmentManager.fragmentFactory.instantiate(classLoader, pref.fragment)
val fragment = supportFragmentManager.fragmentFactory.instantiate(
classLoader,
pref.fragment.toString()
)
pushView(fragment)
return true
}

View File

@ -64,11 +64,11 @@ class AdvancedFragment : PreferenceFragmentCompat(),
override fun onResume() {
super.onResume()
preferenceScreen.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
}
override fun onPause() {
super.onPause()
preferenceScreen.sharedPreferences.unregisterOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.unregisterOnSharedPreferenceChangeListener(this)
}
}

View File

@ -80,11 +80,11 @@ class AppearanceFragment : PreferenceFragmentCompat(),
override fun onResume() {
super.onResume()
preferenceScreen.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
}
override fun onPause() {
super.onPause()
preferenceScreen.sharedPreferences.unregisterOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.unregisterOnSharedPreferenceChangeListener(this)
}
}

View File

@ -83,10 +83,10 @@ class NotificationsFragment : PreferenceFragmentCompat(),
}
override fun onCreateRecyclerView(
inflater: LayoutInflater?,
parent: ViewGroup?,
inflater: LayoutInflater,
parent: ViewGroup,
state: Bundle?
): RecyclerView? = super.onCreateRecyclerView(inflater, parent, state)
): RecyclerView = super.onCreateRecyclerView(inflater, parent, state)
.also {
it.itemAnimator = null
it.layoutAnimation = null
@ -214,11 +214,11 @@ class NotificationsFragment : PreferenceFragmentCompat(),
override fun onResume() {
super.onResume()
preferenceScreen.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
}
override fun onPause() {
super.onPause()
preferenceScreen.sharedPreferences.unregisterOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.unregisterOnSharedPreferenceChangeListener(this)
}
}

View File

@ -96,11 +96,11 @@ class SyncFragment : PreferenceFragmentCompat(),
override fun onResume() {
super.onResume()
preferenceScreen.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
}
override fun onPause() {
super.onPause()
preferenceScreen.sharedPreferences.unregisterOnSharedPreferenceChangeListener(this)
preferenceScreen.sharedPreferences?.unregisterOnSharedPreferenceChangeListener(this)
}
}