Commit 2d36b2ee authored by sheteng's avatar sheteng

2.0 开发 8

parent cd7a932d
......@@ -8,6 +8,7 @@ import com.ccwangluo.accelerator.model.GameInfo
import com.ccwangluo.accelerator.utils.AcceleratorUtils
import com.ccwangluo.accelerator.utils.SysUtils
import com.ccwangluo.accelerator.utils.http.HttpGo
import com.github.shadowsocks.bg.BaseService
import com.xuexiang.xpage.base.XPageFragment
import com.xuexiang.xutil.app.AppUtils
import kotlinx.coroutines.Dispatchers
......@@ -21,7 +22,7 @@ class GameListModel : ViewModel() {
val clearList = MutableLiveData<Boolean>()
fun freshData(xPageFragment: XPageFragment, page: Int) {
var packageName = if (AcceleratorUtils.game == null) "" else AcceleratorUtils.game!!.packageName
var packageName = if (AcceleratorUtils.game == null || AcceleratorUtils.state != BaseService.State.Connected) "" else AcceleratorUtils.game!!.packageName
xPageFragment.lifecycleScope.launch(Dispatchers.IO) {
val res =
HttpGo.getSync<Game>("/api/new/game/list?page=${page}&size=20&channelId=${SysUtils.getChannel()}&packageName=${packageName}")
......
......@@ -148,8 +148,8 @@
android:visibility="gone">
<TextView
android:layout_width="25dp"
android:layout_height="18dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="加速"
android:textColor="#FFFFFFFF"
android:textSize="12.5sp" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment