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
cd7a932d
Commit
cd7a932d
authored
Jul 28, 2022
by
sheteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0 开发 7
parent
5b740373
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
+3
-1
app/src/main/java/com/ccwangluo/accelerator/ui/gameList/GameListFragment.kt
...com/ccwangluo/accelerator/ui/gameList/GameListFragment.kt
+14
-6
No files found.
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
View file @
cd7a932d
...
@@ -15,6 +15,7 @@ data class GameInfo(
...
@@ -15,6 +15,7 @@ data class GameInfo(
val
dnsServer
:
String
,
val
dnsServer
:
String
,
val
downloadType
:
Int
,
val
downloadType
:
Int
,
val
downloadUrl
:
String
,
val
downloadUrl
:
String
,
val
downloadUrlTools
:
String
?,
val
gameName
:
String
,
val
gameName
:
String
,
val
icon
:
String
,
val
icon
:
String
,
val
id
:
Int
,
val
id
:
Int
,
...
@@ -25,7 +26,8 @@ data class GameInfo(
...
@@ -25,7 +26,8 @@ data class GameInfo(
val
score
:
String
,
val
score
:
String
,
val
size
:
String
,
val
size
:
String
,
val
type
:
Int
,
val
type
:
Int
,
val
version
:
String
val
version
:
String
,
val
versionTools
:
String
?
)
)
data class
Announcement
(
data class
Announcement
(
...
...
app/src/main/java/com/ccwangluo/accelerator/ui/gameList/GameListFragment.kt
View file @
cd7a932d
...
@@ -204,6 +204,9 @@ class GameListFragment : XPageFragment() {
...
@@ -204,6 +204,9 @@ class GameListFragment : XPageFragment() {
else
if
(!
SysUtils
.
compareVersionTo
(
else
if
(!
SysUtils
.
compareVersionTo
(
AppUtils
.
getAppVersionName
(
itemData
.
packageName
),
AppUtils
.
getAppVersionName
(
itemData
.
packageName
),
itemData
.
version
itemData
.
version
)
||
!
SysUtils
.
compareVersionTo
(
AppUtils
.
getAppVersionName
(
itemData
.
packageName
),
itemData
.
versionTools
)
)
)
{
)
{
btn_uninstall
.
visibility
=
View
.
GONE
btn_uninstall
.
visibility
=
View
.
GONE
...
@@ -212,8 +215,7 @@ class GameListFragment : XPageFragment() {
...
@@ -212,8 +215,7 @@ class GameListFragment : XPageFragment() {
tx_game_update_notice
.
visibility
=
View
.
VISIBLE
tx_game_update_notice
.
visibility
=
View
.
VISIBLE
tx_download_status
.
visibility
=
View
.
GONE
tx_download_status
.
visibility
=
View
.
GONE
btn_download_status
.
visibility
=
View
.
GONE
btn_download_status
.
visibility
=
View
.
GONE
}
}
else
{
else
{
btn_uninstall
.
visibility
=
View
.
GONE
btn_uninstall
.
visibility
=
View
.
GONE
btn_acc
.
visibility
=
View
.
VISIBLE
btn_acc
.
visibility
=
View
.
VISIBLE
btn_acc_stop
.
visibility
=
View
.
GONE
btn_acc_stop
.
visibility
=
View
.
GONE
...
@@ -290,7 +292,7 @@ class GameListFragment : XPageFragment() {
...
@@ -290,7 +292,7 @@ class GameListFragment : XPageFragment() {
downloadInfo
.
speed
=
downloadInfo
.
speed
=
(
downloadInfo
.
download_so_far
-
if
(
lastInfo
==
null
)
0
else
lastInfo
.
download_so_far
)
(
downloadInfo
.
download_so_far
-
if
(
lastInfo
==
null
)
0
else
lastInfo
.
download_so_far
)
if
(
lastInfo
!=
null
)
{
if
(
lastInfo
!=
null
)
{
if
(
downloadInfo
.
speed
==
0L
&&
lastInfo
.
speed
!=
0L
){
if
(
downloadInfo
.
speed
==
0L
&&
lastInfo
.
speed
!=
0L
)
{
downloadInfo
.
speed
=
lastInfo
.
speed
downloadInfo
.
speed
=
lastInfo
.
speed
}
}
}
}
...
@@ -318,7 +320,7 @@ class GameListFragment : XPageFragment() {
...
@@ -318,7 +320,7 @@ class GameListFragment : XPageFragment() {
}
else
if
(
ann
.
type
==
1
)
{
}
else
if
(
ann
.
type
==
1
)
{
val
params
=
Bundle
()
val
params
=
Bundle
()
params
.
putInt
(
Constants
.
GAME_ID
,
ann
.
gameId
)
params
.
putInt
(
Constants
.
GAME_ID
,
ann
.
gameId
)
openPage
(
NewsFragment
::
class
.
java
,
params
)
openPage
(
NewsFragment
::
class
.
java
,
params
)
}
}
}
}
...
@@ -391,7 +393,13 @@ class GameListFragment : XPageFragment() {
...
@@ -391,7 +393,13 @@ class GameListFragment : XPageFragment() {
return
return
}
}
activity
?.
let
{
activity
?.
let
{
if
(
itemData
.
downloadUrl
.
endsWith
(
".apk"
))
{
var
downloadUrl
=
itemData
.
downloadUrl
if
(
SysUtils
.
compareVersionTo
(
itemData
.
versionTools
,
itemData
.
version
))
{
itemData
.
downloadUrlTools
?.
let
{
downloadUrl
=
it
}
}
if
(
downloadUrl
?.
endsWith
(
".apk"
)
==
true
)
{
GameDownloadDialog
(
GameDownloadDialog
(
itemData
,
itemData
,
this
@GameListFragment
this
@GameListFragment
...
@@ -403,7 +411,7 @@ class GameListFragment : XPageFragment() {
...
@@ -403,7 +411,7 @@ class GameListFragment : XPageFragment() {
}.
setBtnRight
(
"去找找"
)
{
}.
setBtnRight
(
"去找找"
)
{
val
intent
=
Intent
(
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
itemData
.
downloadUrl
)
Uri
.
parse
(
downloadUrl
)
)
)
startActivity
(
intent
)
startActivity
(
intent
)
}.
show
<
CommonDialog
>()
}.
show
<
CommonDialog
>()
...
...
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