fix auto upgrade

This commit is contained in:
niuhuan 2022-02-28 07:20:58 +08:00
parent d0d037d7d4
commit b50f7e11d9
3 changed files with 7 additions and 5 deletions

View File

@ -66,6 +66,10 @@ func LoadBoolProperty(name string, defaultValue bool) (bool, error) {
return strconv.ParseBool(stringValue)
}
func SaveBoolProperty(name string, value bool) error {
return SaveProperty(name, strconv.FormatBool(value))
}
func LoadIntProperty(name string, defaultValue int) (int, error) {
str, err := LoadProperty(name, fmt.Sprintf("%d", defaultValue))
if err != nil {
@ -78,10 +82,6 @@ func SaveIntProperty(name string, value int) error {
return SaveProperty(name, strconv.Itoa(value))
}
func SaveBoolProperty(name string, value bool) error {
return SaveProperty(name, strconv.FormatBool(value))
}
func SaveProxy(value string) error {
return SaveProperty("proxy", value)
}

View File

@ -730,6 +730,8 @@ func FlatInvoke(method string, params string) (string, error) {
return updateSlogan(params)
case "updateAvatar":
return updateAvatar(params)
case "defaultHttpClientGet":
return defaultHttpClientGet(params)
}
return "", errors.New("method not found : " + method)
}

View File

@ -131,7 +131,7 @@ class _UserProfileCardState extends State<UserProfileCard> {
strutStyle: nameStrutStyle,
),
Text(
"Lv. ${profile.level} (${profile.title})",
"(Lv. ${profile.level}) (${profile.title})",
style: levelStyle,
strutStyle: levelStrutStyle,
),