No need to have mutable list in param

This commit is contained in:
Benoit Marty 2020-01-29 16:03:28 +01:00
parent a4abe5f552
commit 237da5bb16

View file

@ -235,7 +235,7 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
}
cryptoStore.saveDeviceTrackingStatuses(deviceTrackingStatuses)
dispatchDeviceChange(userIds.toImmutableList())
dispatchDeviceChange(userIds)
return usersDevicesInfoMap
}
@ -294,7 +294,7 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
*
* @param downloadUsers the user ids list
*/
private suspend fun doKeyDownloadForUsers(downloadUsers: MutableList<String>): MXUsersDevicesMap<CryptoDeviceInfo> {
private suspend fun doKeyDownloadForUsers(downloadUsers: List<String>): MXUsersDevicesMap<CryptoDeviceInfo> {
Timber.v("## doKeyDownloadForUsers() : doKeyDownloadForUsers $downloadUsers")
// get the user ids which did not already trigger a keys download
val filteredUsers = downloadUsers.filter { MatrixPatterns.isUserId(it) }