|
|
@ -2,8 +2,10 @@ package com.gyf.csams.association.model |
|
|
|
|
|
|
|
|
|
|
|
import androidx.lifecycle.LiveData |
|
|
|
import androidx.lifecycle.LiveData |
|
|
|
import androidx.lifecycle.MutableLiveData |
|
|
|
import androidx.lifecycle.MutableLiveData |
|
|
|
|
|
|
|
import androidx.lifecycle.viewModelScope |
|
|
|
import com.gyf.csams.uikit.ScrollList |
|
|
|
import com.gyf.csams.uikit.ScrollList |
|
|
|
import com.gyf.csams.uikit.StringForm |
|
|
|
import com.gyf.csams.uikit.StringForm |
|
|
|
|
|
|
|
import kotlinx.coroutines.launch |
|
|
|
import kotlin.random.Random |
|
|
|
import kotlin.random.Random |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -174,6 +176,7 @@ class ExamViewModel:ScrollList<Exam>() { |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun load() { |
|
|
|
override fun load() { |
|
|
|
|
|
|
|
viewModelScope.launch { |
|
|
|
_data.value?.apply { |
|
|
|
_data.value?.apply { |
|
|
|
repeat(initSize) { |
|
|
|
repeat(initSize) { |
|
|
|
if (Random.nextBoolean()){ |
|
|
|
if (Random.nextBoolean()){ |
|
|
@ -191,6 +194,7 @@ class ExamViewModel:ScrollList<Exam>() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
*TODO 加载更多题目 |
|
|
|
*TODO 加载更多题目 |
|
|
|