Commit c30f48ab authored by Lucio Maciel's avatar Lucio Maciel

Fix multiserver repository

parent d245d8b9
......@@ -14,12 +14,12 @@ class SharedPreferencesAccountsRepository(
private val moshi: Moshi
) : AccountsRepository {
override fun save(account: Account) {
override fun save(newAccount: Account) {
val accounts = load()
val newList = accounts.filter { it.serverUrl != it.serverUrl }
val newList = accounts.filter { account -> newAccount.serverUrl != account.serverUrl }
.toMutableList()
newList.add(0, account)
newList.add(0, newAccount)
save(newList)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment