kopia lustrzana https://github.com/ryukoposting/Signal-Android
Prevent failed Spinner transforms from blocking query.
rodzic
657a9c7b0a
commit
9505c3d070
|
@ -78,7 +78,7 @@ internal class SpinnerServer(
|
||||||
val commands: Queue<QueryItem> = recentSql[dbName] ?: ConcurrentLinkedQueue()
|
val commands: Queue<QueryItem> = recentSql[dbName] ?: ConcurrentLinkedQueue()
|
||||||
|
|
||||||
commands += QueryItem(System.currentTimeMillis(), sql)
|
commands += QueryItem(System.currentTimeMillis(), sql)
|
||||||
if (commands.size > 100) {
|
if (commands.size > 500) {
|
||||||
commands.remove()
|
commands.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,11 @@ internal class SpinnerServer(
|
||||||
val row = mutableListOf<String>()
|
val row = mutableListOf<String>()
|
||||||
for (i in 0 until numColumns) {
|
for (i in 0 until numColumns) {
|
||||||
val columnName: String = getColumnName(i)
|
val columnName: String = getColumnName(i)
|
||||||
row += transformers[i].transform(null, columnName, this)
|
try {
|
||||||
|
row += transformers[i].transform(null, columnName, this)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
row += "*Failed to Transform*\n\n${DefaultColumnTransformer.transform(null, columnName, this)}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rows += row
|
rows += row
|
||||||
|
|
Ładowanie…
Reference in New Issue