We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8f10a2 commit 377bb6eCopy full SHA for 377bb6e
1 file changed
app/src/main/java/io/github/sds100/keymapper/backup/BackupManager.kt
@@ -490,13 +490,13 @@ class BackupManagerImpl(
490
var entity = layout
491
var subCount = 0
492
493
- while (true) {
+ while (subCount < 1000) {
494
try {
495
- floatingLayoutRepository.insert(layout)
+ floatingLayoutRepository.insert(entity)
496
break
497
} catch (_: SQLiteConstraintException) {
498
// If the name already exists try creating it with a new name.
499
- entity = layout.copy(name = "${entity.name} (${subCount + 1})")
+ entity = layout.copy(name = "${layout.name} (${subCount + 1})")
500
subCount++
501
}
502
0 commit comments