Skip to content

Commit

Permalink
fix potential import / export issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Apr 27, 2023
1 parent 509e0c4 commit b0a1791
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
- Not applicable

## [1.2.8] - 2023-04-27
### Changed
- Fix potential import / export issue

## [1.2.7] - 2023-04-25
### Changed
- Crash fix
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "helium314.localbackend"
minSdkVersion 18
targetSdkVersion 33
versionCode 35
versionName "1.2.7"
versionCode 36
versionName "1.2.8"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class SettingsActivity : PreferenceActivity() {
prefs.unregisterOnSharedPreferenceChangeListener(listener)
if (!importExportRunning) // avoid unpausing the backend while database is used
BackendService.instance?.reloadSettings()
if (BackendService.instance == null)
Database.instance?.close()
// never close database here, this will happen automatically by GC if BackendService
// is not running: https://stackoverflow.com/a/35648781
}

private fun onClickCull() {
Expand Down Expand Up @@ -574,7 +574,7 @@ class SettingsActivity : PreferenceActivity() {
addView(t)
})
}
layout.setPadding(30,10,30,10)
layout.setPadding(30, 10, 30, 10)
d = AlertDialog.Builder(this)
.setTitle(R.string.show_scan_results)
.setView(ScrollView(this).apply { addView(layout) })
Expand Down

0 comments on commit b0a1791

Please sign in to comment.