Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Updater: Remove File MD5, Fix Typo, Enable per app language support a…
Browse files Browse the repository at this point in the history
…nd Adjust UI (#8)

Co-authored-by: YuKongA <[email protected]>
  • Loading branch information
lightsummer233 and YuKongA authored Dec 29, 2023
1 parent 2da2673 commit 9702d3d
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 158 deletions.
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {
}
debug {
if (keystorePath != null) signingConfig = signingConfigs.getByName("release")
applicationIdSuffix = ".debug"
}
}
compileOptions {
Expand All @@ -63,6 +64,9 @@ android {
viewBinding = true
buildConfig = true
}
androidResources {
generateLocaleConfig = true
}
packaging {
resources {
excludes += "**"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/kotlin/top/yukonga/update/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ class MainActivity : AppCompatActivity() {
)

val secondViewTitleArray = arrayOf(
bigVersion, filename, filesize, filemd5, download, changelog, secondInfo
bigVersion, filename, filesize, download, changelog, secondInfo
)

val firstViewContentArray = arrayOf(
codenameInfo, systemInfo, codebaseInfo, branchInfo
)

val secondViewContentArray = arrayOf(
bigVersionInfo, filenameInfo, filesizeInfo, filemd5Info, changelogInfo
bigVersionInfo, filenameInfo, filesizeInfo, changelogInfo
)

CoroutineScope(Dispatchers.Default).launch {
Expand Down Expand Up @@ -297,7 +297,6 @@ class MainActivity : AppCompatActivity() {

filenameInfo.setTextAnimation(recoveryRomInfo.currentRom.filename)
filesizeInfo.setTextAnimation(recoveryRomInfo.currentRom.filesize)
filemd5Info.setTextAnimation(recoveryRomInfo.currentRom.md5)

val officialLink = if (recoveryRomInfo.currentRom.md5 == recoveryRomInfo.latestRom?.md5) getString(
R.string.official1_link, recoveryRomInfo.currentRom.version, recoveryRomInfo.latestRom.filename
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="28dp"
android:paddingStart="20dp"
android:paddingEnd="24dp"
app:layout_scrollEffect="compress"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:menu="@menu/top_app_bar"
Expand Down
141 changes: 70 additions & 71 deletions app/src/main/res/layout-land/main_content.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="20dp"
android:paddingStart="12dp"
android:paddingEnd="16dp"
app:layout_scrollEffect="compress"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:menu="@menu/top_app_bar"
Expand Down
143 changes: 72 additions & 71 deletions app/src/main/res/layout/main_content.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/src/main/res/resources.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unqualifiedResLocale=en-US
5 changes: 2 additions & 3 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<string name="filesize">文件大小</string>
<string name="download">下载链接</string>
<string name="changelog">更新日志</string>
<string name="branch">分支</string>
<string name="branch">版本分支</string>
<string name="toast_no_info">未获取到有效信息!</string>
<string name="toast_copied_to_pasteboard">已复制到剪贴板</string>
<string name="account">账号</string>
Expand All @@ -34,8 +34,7 @@
<string name="confirm">确定</string>
<string name="logout_successful">登出成功</string>
<string name="logout_desc">确定要登出么?</string>
<string name="filemd5">文件MD5</string>
<string name="regions_code">区域代号</string>
<string name="login_expired">检测到登录已过期,建议重新登录</string>
<string name="login_expired">检测到登录已过期,建议重新登录</string>
<string name="global">全球账号</string>
</resources>
5 changes: 2 additions & 3 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<string name="filesize">檔案大小</string>
<string name="download">下載連結</string>
<string name="changelog">更新日誌</string>
<string name="branch">分支</string>
<string name="branch">版本分支</string>
<string name="toast_no_info">未取得到有效讯息!</string>
<string name="toast_copied_to_pasteboard">已複製到剪貼簿</string>
<string name="account">帳戶</string>
Expand All @@ -34,8 +34,7 @@
<string name="confirm">確定</string>
<string name="logout_successful">登出成功</string>
<string name="logout_desc">確定要登出麼?</string>
<string name="filemd5">檔案MD5</string>
<string name="regions_code">區域代號</string>
<string name="login_expired">偵測到登陸已過期,建議重新登陸</string>
<string name="login_expired">偵測到登陸已過期,建議重新登陸</string>
<string name="global">全球帳戶</string>
</resources>
5 changes: 2 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@
<string name="logout">Logout</string>
<string name="confirm">Confirm</string>
<string name="logout_successful">Logout successful</string>
<string name="logout_desc">Are you sure you want to logouy?</string>
<string name="filemd5">File MD5</string>
<string name="logout_desc">Are you sure you want to logout?</string>
<string name="regions_code">Regions code</string>
<string name="login_expired">Checked that the login has expired. It is recommended to log in again</string>
<string name="login_expired">Checked that the login has expired. It is recommended to log in again.</string>
<string name="global">Global account</string>
</resources>

0 comments on commit 9702d3d

Please sign in to comment.