Unverified Commit b5144cae authored by Lucio Maciel's avatar Lucio Maciel Committed by GitHub

Merge pull request #1650 from RocketChat/fix/fix-multiserver

[FIX] fix multiserver
parents 3e0f1a48 37231ee5
......@@ -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