Fixed bug with hasData not being cleared and improved sapling tree selection.
- Choose the latest tree above the requested height
This commit is contained in:
parent
596bea0158
commit
7babe0c63c
|
@ -183,6 +183,7 @@ class Initializer(
|
||||||
*/
|
*/
|
||||||
fun clear() {
|
fun clear() {
|
||||||
rustBackend.clear()
|
rustBackend.clear()
|
||||||
|
prefs[PREFS_HAS_DATA] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,9 +295,10 @@ class Initializer(
|
||||||
)
|
)
|
||||||
val file: String
|
val file: String
|
||||||
try {
|
try {
|
||||||
file = treeFiles.first() {
|
file = if (birthdayHeight == null) treeFiles.first() else {
|
||||||
if (birthdayHeight == null) true
|
treeFiles.first {
|
||||||
else it.contains(birthdayHeight.toString())
|
it.split(".").first().toInt() <= birthdayHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
throw BirthdayException.BirthdayFileNotFoundException(
|
throw BirthdayException.BirthdayFileNotFoundException(
|
||||||
|
|
Loading…
Reference in New Issue