From 36b761748382f1183cc2fc49a2e1659185c14e33 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 29 Sep 2021 16:57:10 +0200 Subject: [PATCH] Add comment about copy/paste code --- .../main/java/im/vector/app/features/displayname/Extension.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/java/im/vector/app/features/displayname/Extension.kt b/vector/src/main/java/im/vector/app/features/displayname/Extension.kt index 8d4340875f..6ca1d48464 100644 --- a/vector/src/main/java/im/vector/app/features/displayname/Extension.kt +++ b/vector/src/main/java/im/vector/app/features/displayname/Extension.kt @@ -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