From dd8c908dc7a6e082118fa9fb3219afc8019b124f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 9 Jan 2020 15:02:39 +0100 Subject: [PATCH] Code cleanup --- CHANGES.md | 3 +-- .../features/roomdirectory/picker/RoomDirectoryListCreator.kt | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3741f69426..15153bb20e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,6 @@ Features ✨: Improvements 🙌: - The initial sync is now handled by a foreground service - Render aliases and canonical alias change in the timeline - - Fix autocompletion issues and add support for rooms and groups - Introduce developer mode in the settings (#745, #796) - Improve devices list screen - Add settings for rageshake sensibility @@ -18,7 +17,7 @@ Improvements 🙌: Other changes: - Change the way RiotX identifies a session to allow the SDK to support several sessions with the same user (#800) - Exclude play-services-oss-licenses library from F-Droid build (#814) - - Email domain can be limited on some homeserver, i18n of the displayed error (#754) + - Email domain can be limited on some homeservers, i18n of the displayed error (#754) Bugfix 🐛: - Fix crash when opening room creation screen from the room filtering screen diff --git a/vector/src/main/java/im/vector/riotx/features/roomdirectory/picker/RoomDirectoryListCreator.kt b/vector/src/main/java/im/vector/riotx/features/roomdirectory/picker/RoomDirectoryListCreator.kt index 4073929a4f..0b02101ecb 100644 --- a/vector/src/main/java/im/vector/riotx/features/roomdirectory/picker/RoomDirectoryListCreator.kt +++ b/vector/src/main/java/im/vector/riotx/features/roomdirectory/picker/RoomDirectoryListCreator.kt @@ -26,13 +26,11 @@ import javax.inject.Inject class RoomDirectoryListCreator @Inject constructor(private val stringArrayProvider: StringArrayProvider, private val session: Session) { - private val credentials = session.sessionParams.credentials - fun computeDirectories(thirdPartyProtocolData: Map): List { val result = ArrayList() // Add user homeserver name - val userHsName = credentials.userId.substring(credentials.userId.indexOf(":") + 1) + val userHsName = session.myUserId.substringAfter(":") result.add(RoomDirectoryData( displayName = userHsName,