[Android] Rename Streams viewmodel to StreamsModel
Geoffrey Métais
git at videolan.org
Mon Aug 6 16:18:28 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Aug 6 16:17:46 2018 +0200| [3185148bf2befa47517f95ba401dc303adbd4b91] | committer: Geoffrey Métais
Rename Streams viewmodel to StreamsModel
> https://code.videolan.org/videolan/vlc-android/commit/3185148bf2befa47517f95ba401dc303adbd4b91
---
vlc-android/res/layout/mrl_panel.xml | 2 +-
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt | 6 +++---
.../videolan/vlc/viewmodels/{MRLPanelModel.kt => StreamsModel.kt} | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/vlc-android/res/layout/mrl_panel.xml b/vlc-android/res/layout/mrl_panel.xml
index 65d5ead8c..24c049c15 100644
--- a/vlc-android/res/layout/mrl_panel.xml
+++ b/vlc-android/res/layout/mrl_panel.xml
@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable name="viewmodel"
- type="org.videolan.vlc.viewmodels.MRLPanelModel"/>
+ type="org.videolan.vlc.viewmodels.StreamsModel"/>
</data>
<android.support.v4.widget.NestedScrollView
diff --git a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
index 01cffef40..ef27f75ad 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
@@ -44,14 +44,14 @@ import org.videolan.vlc.databinding.MrlPanelBinding
import org.videolan.vlc.gui.DialogActivity
import org.videolan.vlc.gui.helpers.UiTools
import org.videolan.vlc.media.MediaUtils
-import org.videolan.vlc.viewmodels.MRLPanelModel
+import org.videolan.vlc.viewmodels.StreamsModel
const val TAG = "VLC/MrlPanelFragment"
class MRLPanelFragment : DialogFragment(), View.OnKeyListener, TextView.OnEditorActionListener, View.OnClickListener {
private lateinit var adapter: MRLAdapter
private lateinit var editText: TextInputLayout
- private lateinit var viewModel: MRLPanelModel
+ private lateinit var viewModel: StreamsModel
private val listEventActor = actor<MediaWrapper>(UI) {
for (event in channel) playMedia(event)
@@ -60,7 +60,7 @@ class MRLPanelFragment : DialogFragment(), View.OnKeyListener, TextView.OnEditor
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setStyle(DialogFragment.STYLE_NO_FRAME, 0)
- viewModel = ViewModelProviders.of(this).get(MRLPanelModel::class.java)
+ viewModel = ViewModelProviders.of(this).get(StreamsModel::class.java)
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
similarity index 97%
rename from vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt
rename to vlc-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
index 37ae748ed..ce177656b 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/MRLPanelModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/StreamsModel.kt
@@ -30,7 +30,7 @@ import org.videolan.vlc.util.VLCIO
import org.videolan.vlc.util.uiJob
-class MRLPanelModel: ViewModel() {
+class StreamsModel: ViewModel() {
val observableSearchText = ObservableField<String>()
val observableHistory = MutableLiveData<Array<MediaWrapper>>()
More information about the Android
mailing list