fix(ServeConfigModel.init): invoke callBack when server is null

This commit is contained in:
Xwite 2023-03-10 10:49:42 +08:00
parent d605d2f149
commit d7630ee0d6

View File

@ -19,11 +19,9 @@ class ServerConfigViewModel(application: Application): BaseViewModel(application
null null
} }
}.onSuccess { }.onSuccess {
if (it != null) {
onSuccess.invoke() onSuccess.invoke()
} }
} }
}
fun save(server: Server, onSuccess: () -> Unit) { fun save(server: Server, onSuccess: () -> Unit) {
execute { execute {