mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-16 08:26:38 +08:00
compatible 16:10
This commit is contained in:
@@ -9,8 +9,6 @@ class TVListViewModel : ViewModel() {
|
||||
|
||||
var maxNum = mutableListOf<Int>()
|
||||
|
||||
private var sharedPref: SharedPreferences? = null
|
||||
|
||||
private val tvListViewModel = MutableLiveData<MutableList<TVViewModel>>()
|
||||
|
||||
private val _itemPosition = MutableLiveData<Int>()
|
||||
@@ -48,13 +46,6 @@ class TVListViewModel : ViewModel() {
|
||||
_itemPositionCurrent.value = position
|
||||
}
|
||||
|
||||
fun savePosition(position: Int) {
|
||||
with(sharedPref!!.edit()) {
|
||||
putInt("position", position)
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
fun size(): Int {
|
||||
return tvListViewModel.value!!.size
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user