Fixed migrated server indexing

This commit is contained in:
Nite 2020-09-22 20:18:36 +02:00
parent cc954e4d5a
commit bed29ce33b
No known key found for this signature in database
GPG Key ID: 1D1AD59B1C6386C1
1 changed files with 3 additions and 1 deletions

View File

@ -56,11 +56,13 @@ class ServerSettingsModel(
val serverNum = settings.getInt(PREFERENCES_KEY_ACTIVE_SERVERS, 0)
if (serverNum != 0) {
var index = 1
for (x in 1 until serverNum + 1) {
val newServerSetting = loadServerSettingFromPreferences(x, settings)
val newServerSetting = loadServerSettingFromPreferences(index, settings)
if (newServerSetting != null) {
dbServerList.add(newServerSetting)
repository.insert(newServerSetting)
index++
Log.i(
TAG,
"Imported server from Preferences to Database:" +