Fix profile update bug
This commit is contained in:
@@ -50,8 +50,10 @@ class MethodHandler : FlutterPlugin, MethodChannel.MethodCallHandler {
|
||||
GlobalScope.launch {
|
||||
result.runCatching {
|
||||
val args = call.arguments as Map<*, *>
|
||||
val path = args["path"] as String? ?: ""
|
||||
val msg = BoxService.parseConfig(path)
|
||||
val path = args["path"] as String
|
||||
val tempPath = args["tempPath"] as String
|
||||
val debug = args["debug"] as Boolean
|
||||
val msg = BoxService.parseConfig(path, tempPath, debug)
|
||||
success(msg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ class BoxService(
|
||||
return
|
||||
}
|
||||
|
||||
fun parseConfig(path: String): String {
|
||||
fun parseConfig(path: String, tempPath: String, debug: Boolean): String {
|
||||
return try {
|
||||
Mobile.parse(path)
|
||||
Mobile.parse(path, tempPath, debug)
|
||||
""
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, e)
|
||||
@@ -157,7 +157,7 @@ class BoxService(
|
||||
return
|
||||
}
|
||||
|
||||
if(Settings.debugMode) {
|
||||
if (Settings.debugMode) {
|
||||
File(workingDir, "current-config.json").writeText(content)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user