-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor checkNewVersion function to use LatestVersionInfo data class (…
…#1733) - Updated the checkNewVersion function to return a LatestVersionInfo data class instead of a Triple. - Defined default null value for LatestVersionInfo in case of failure. - Improved readability and maintainability by replacing the Triple with a data class. - Included version code, download URL, and changelog in the LatestVersionInfo data class. --------- Co-authored-by: weishu <[email protected]>
- Loading branch information
Showing
5 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
manager/app/src/main/java/me/weishu/kernelsu/ui/util/module/LatestVersionInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.weishu.kernelsu.ui.util.module | ||
|
||
data class LatestVersionInfo( | ||
val versionCode : Int = 0, | ||
val downloadUrl : String = "", | ||
val changelog : String = "" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
android.experimental.enableNewResourceShrinker.preciseShrinking=true | ||
android.enableAppCompileTimeRClass=true | ||
android.useAndroidX=true | ||
org.gradle.jvmargs=-Xmx3072m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# Copyright © 2015-2021 the original authors. | ||
# | ||
|