Add comment about copy/paste code

This commit is contained in:
Benoit Marty 2021-09-29 16:57:10 +02:00 committed by Benoit Marty
parent 289b7e2d53
commit 36b7617483

View file

@ -19,6 +19,7 @@ package im.vector.app.features.displayname
import org.matrix.android.sdk.api.util.MatrixItem
fun MatrixItem.getBestName(): String {
// Note: this code is copied from [DisplayNameResolver] in the SDK
return if (this is MatrixItem.GroupItem || this is MatrixItem.RoomAliasItem) {
// Best name is the id, and we keep the displayName of the room for the case we need the first letter
id