fix: 替换 String.format 为 padStart 以兼容 KMP commonMain

String.format 是 JVM 专属 API,在 commonMain 中不可用,
导致 GIF_FILES 类型推断失败及连锁编译错误。
padStart 是 Kotlin stdlib 跨平台 API,行为一致。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
xfy 2026-05-19 16:18:55 +08:00
parent b5debbe74d
commit f7c3df4b19

View File

@ -16,7 +16,7 @@ import plus.rua.project.getGifUri
/**
* GIF 文件名列表001.gif ~ 152.gif
*/
private val GIF_FILES = (1..152).map { String.format("%03d.gif", it) }
private val GIF_FILES = (1..152).map { "${it.toString().padStart(3, '0')}.gif" }
/**
* 显示动画 GIF 图片切换日期时随机选择一个