Rename autoUpload to shouldUpload
This commit is contained in:
parent
774b2f99f2
commit
7b8eb3e09c
11 changed files with 51 additions and 18 deletions
|
@ -13,10 +13,12 @@ class CrashReporter {
|
|||
options = {}
|
||||
}
|
||||
this.productName = options.productName != null ? options.productName : app.getName()
|
||||
let {autoSubmit, companyName, extra, ignoreSystemCrashHandler, submitURL} = options
|
||||
let {autoSubmit, companyName, extra, ignoreSystemCrashHandler, submitURL, shouldUpload} = options
|
||||
|
||||
if (autoSubmit == null) {
|
||||
autoSubmit = true
|
||||
if (autoSubmit == null && shouldUpload == null) {
|
||||
shouldUpload = true
|
||||
} else {
|
||||
shouldUpload = shouldUpload || autoSubmit
|
||||
}
|
||||
if (ignoreSystemCrashHandler == null) {
|
||||
ignoreSystemCrashHandler = false
|
||||
|
@ -56,7 +58,8 @@ class CrashReporter {
|
|||
})
|
||||
}
|
||||
|
||||
binding.start(this.getProductName(), companyName, submitURL, this.getCrashesDirectory(), autoSubmit, ignoreSystemCrashHandler, extra)
|
||||
this._shouldUpload = shouldUpload
|
||||
binding.start(this.getProductName(), companyName, submitURL, this.getCrashesDirectory(), shouldUpload, ignoreSystemCrashHandler, extra)
|
||||
}
|
||||
|
||||
getLastCrashReport () {
|
||||
|
@ -95,6 +98,15 @@ class CrashReporter {
|
|||
}
|
||||
return this.tempDirectory
|
||||
}
|
||||
|
||||
getShouldUpload() {
|
||||
return this._shouldUpload
|
||||
}
|
||||
|
||||
setShouldUpload(shouldUpload) {
|
||||
this._shouldUpload = shouldUpload
|
||||
return bindings._setShouldUpload(shouldUpload)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new CrashReporter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue