Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
2d36b2ee
Commit
2d36b2ee
authored
Aug 10, 2022
by
sheteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0 开发 8
parent
cd7a932d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/src/main/java/com/ccwangluo/accelerator/ui/gameList/GameListModel.kt
...va/com/ccwangluo/accelerator/ui/gameList/GameListModel.kt
+2
-1
app/src/main/res/layout/item_game.xml
app/src/main/res/layout/item_game.xml
+2
-2
No files found.
app/src/main/java/com/ccwangluo/accelerator/ui/gameList/GameListModel.kt
View file @
2d36b2ee
...
...
@@ -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}"
)
...
...
app/src/main/res/layout/item_game.xml
View file @
2d36b2ee
...
...
@@ -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"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment