[Android] Fix wrong package name for PreferenceSearchModel

Nicolas Pomepuy git at videolan.org
Wed Sep 8 06:52:31 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Sep  7 06:56:01 2021 +0200| [f19f66afb59137d76b58fba74b53439885ccdaca] | committer: Nicolas Pomepuy

Fix wrong package name for PreferenceSearchModel

> https://code.videolan.org/videolan/vlc-android/commit/f19f66afb59137d76b58fba74b53439885ccdaca
---

 application/vlc-android/res/layout/preference_item.xml            | 2 +-
 .../org/videolan/vlc/gui/preferences/BasePreferenceFragment.kt    | 1 +
 .../src/org/videolan/vlc/gui/preferences/PreferencesActivity.kt   | 2 ++
 .../src/org/videolan/vlc/gui/preferences/PreferencesFragment.kt   | 1 +
 .../videolan/vlc/gui/preferences/search/PreferenceItemAdapter.kt  | 1 -
 .../org/videolan/vlc/gui/preferences/search/PreferenceParser.kt   | 2 +-
 .../vlc/gui/preferences/search/PreferenceSearchActivity.kt        | 1 -
 .../src/org/videolan/vlc/viewmodels/PreferenceSearchModel.kt      | 8 ++++----
 8 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/application/vlc-android/res/layout/preference_item.xml b/application/vlc-android/res/layout/preference_item.xml
index 79aa825a7..6562be2be 100644
--- a/application/vlc-android/res/layout/preference_item.xml
+++ b/application/vlc-android/res/layout/preference_item.xml
@@ -34,7 +34,7 @@
 
         <variable
                 name="item"
-                type="org.videolan.vlc.gui.preferences.PreferenceItem" />
+                type="org.videolan.vlc.gui.preferences.search.PreferenceItem" />
 
         <variable
                 name="title"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.kt
index 3ded0aa9e..6a8e9602f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/BasePreferenceFragment.kt
@@ -34,6 +34,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.ObsoleteCoroutinesApi
 import org.videolan.vlc.R
 import org.videolan.vlc.gui.preferences.hack.MultiSelectListPreferenceDialogFragmentCompat
+import org.videolan.vlc.gui.preferences.search.PreferenceItem
 
 @ExperimentalCoroutinesApi
 @ObsoleteCoroutinesApi
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.kt
index 68539631c..e1e513bb4 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.kt
@@ -41,6 +41,8 @@ import org.videolan.tools.RESULT_UPDATE_ARTISTS
 import org.videolan.vlc.PlaybackService
 import org.videolan.vlc.R
 import org.videolan.vlc.gui.BaseActivity
+import org.videolan.vlc.gui.preferences.search.PreferenceItem
+import org.videolan.vlc.gui.preferences.search.PreferenceParser
 import org.videolan.vlc.gui.preferences.search.PreferenceSearchActivity
 
 const val EXTRA_PREF_END_POINT = "extra_pref_end_point"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.kt
index 16cb92ac9..596d40867 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.kt
@@ -40,6 +40,7 @@ import org.videolan.vlc.BuildConfig
 import org.videolan.vlc.R
 import org.videolan.vlc.gui.SecondaryActivity
 import org.videolan.vlc.gui.helpers.UiTools
+import org.videolan.vlc.gui.preferences.search.PreferenceItem
 import org.videolan.vlc.util.Permissions
 
 @ExperimentalCoroutinesApi
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceItemAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceItemAdapter.kt
index 72059c5ca..e0c74d012 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceItemAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceItemAdapter.kt
@@ -37,7 +37,6 @@ import androidx.recyclerview.widget.DiffUtil
 import androidx.recyclerview.widget.ListAdapter
 import androidx.recyclerview.widget.RecyclerView
 import org.videolan.vlc.databinding.PreferenceItemBinding
-import org.videolan.vlc.gui.preferences.PreferenceItem
 
 private val cb = object : DiffUtil.ItemCallback<PreferenceItem>() {
     override fun areItemsTheSame(oldItem: PreferenceItem, newItem: PreferenceItem) = oldItem == newItem
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
index 67d0635d1..3bc575c3b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
@@ -22,7 +22,7 @@
  *
  */
 
-package org.videolan.vlc.gui.preferences
+package org.videolan.vlc.gui.preferences.search
 
 import android.content.Context
 import android.content.ContextWrapper
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceSearchActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceSearchActivity.kt
index 8ce4e930f..079398eb9 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceSearchActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceSearchActivity.kt
@@ -39,7 +39,6 @@ import org.videolan.tools.setGone
 import org.videolan.vlc.databinding.PreferencesSearchActivityBinding
 import org.videolan.vlc.gui.BaseActivity
 import org.videolan.vlc.gui.preferences.EXTRA_PREF_END_POINT
-import org.videolan.vlc.gui.preferences.PreferenceItem
 import org.videolan.vlc.viewmodels.PreferenceSearchModel
 import java.util.*
 
diff --git a/application/vlc-android/src/org/videolan/vlc/viewmodels/PreferenceSearchModel.kt b/application/vlc-android/src/org/videolan/vlc/viewmodels/PreferenceSearchModel.kt
index e702a9a15..aaf351d8d 100644
--- a/application/vlc-android/src/org/videolan/vlc/viewmodels/PreferenceSearchModel.kt
+++ b/application/vlc-android/src/org/videolan/vlc/viewmodels/PreferenceSearchModel.kt
@@ -33,8 +33,8 @@ import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.withContext
 import org.videolan.tools.livedata.LiveDataset
-import org.videolan.vlc.gui.preferences.PreferenceItem
-import org.videolan.vlc.gui.preferences.PreferenceParser
+import org.videolan.vlc.gui.preferences.search.PreferenceItem
+import org.videolan.vlc.gui.preferences.search.PreferenceParser
 import java.util.*
 
 class PreferenceSearchModel(context: Context) : ViewModel() {
@@ -74,8 +74,8 @@ class PreferenceSearchModel(context: Context) : ViewModel() {
             }.toMutableList()
     }
 
-    fun getSummary(item:PreferenceItem)= if (showTranslations.value == true) item.summaryEng else item.summary
-    fun getTitle(item:PreferenceItem)= if (showTranslations.value == true) item.titleEng else item.title
+    fun getSummary(item: PreferenceItem)= if (showTranslations.value == true) item.summaryEng else item.summary
+    fun getTitle(item: PreferenceItem)= if (showTranslations.value == true) item.titleEng else item.title
 
     /**
      * Determinate a score for [item] to sort the results for a [query]:



More information about the Android mailing list