Commit ad2e5d2346

ad2e5d2346b787cdefff89d86928cbabd49654e3

parent: a063aa4043

Unsigned

Denis Kasak <dkasak@termina.org.uk> · 2020-06-30 20:03 UTC

Small refactor of Room::calculate_user_name.

Layout: unified · split

src/room_buffer.rs +1 −2
@@ -187,8 +187,7 @@ impl RoomBuffer {
187 /// Calculate the display name for a room member from its UserId. If no member with that ID is in 187 /// Calculate the display name for a room member from its UserId. If no member with that ID is in
188 /// the room, the string representation of the ID will be returned. 188 /// the room, the string representation of the ID will be returned.
189 fn calculate_user_name(&self, user_id: &UserId) -> String { 189 fn calculate_user_name(&self, user_id: &UserId) -> String {
190 let room = self.inner.room.borrow(); 190 self.room().member_display_name(user_id).into_owned()
191 room.member_display_name(user_id).into_owned()
192 } 191 }
193 192
194 pub fn update_buffer_name(&mut self) { 193 pub fn update_buffer_name(&mut self) {