-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Plugin): fix #115 auto update path bug
- Loading branch information
Showing
6 changed files
with
138 additions
and
152 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package moe.dituon.petpet.plugin | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.decodeFromString | ||
import moe.dituon.petpet.share.encodeDefaultsIgnoreUnknownKeysJson | ||
|
||
@Serializable | ||
data class UpdateIndex( | ||
val version: Float = 0f, | ||
val dataList: List<String> = emptyList(), | ||
val fontList: List<String> = emptyList(), | ||
val dataPath: String = DataUpdater.DEFAULT_REPO_DATA_PATH, | ||
) { | ||
companion object { | ||
@JvmStatic | ||
fun fromString(str: String): UpdateIndex { | ||
return encodeDefaultsIgnoreUnknownKeysJson.decodeFromString(str) | ||
} | ||
} | ||
} | ||
|
||
@Serializable | ||
data class UpdateIndexMap( | ||
val length: Map<String, Int> = emptyMap() | ||
) { | ||
companion object { | ||
@JvmStatic | ||
fun fromString(str: String): UpdateIndexMap { | ||
return encodeDefaultsIgnoreUnknownKeysJson.decodeFromString(str) | ||
} | ||
} | ||
} | ||
|
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