From 90dca7149a68128580636cc968dffdd7c39fe8fa Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 24 May 2021 13:32:16 +1000 Subject: [PATCH] Remove redundant `this` --- .../org/session/libsession/messaging/contacts/Contact.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/Contact.kt b/libsession/src/main/java/org/session/libsession/messaging/contacts/Contact.kt index 43b1532b65..9eb34841a3 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/Contact.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/contacts/Contact.kt @@ -37,14 +37,14 @@ class Contact(val sessionID: String) { * The name to display in the UI. For local use only. */ fun displayName(context: ContactContext): String? { - this.nickname?.let { return it } + nickname?.let { return it } return when (context) { - ContactContext.REGULAR -> this.name + ContactContext.REGULAR -> name ContactContext.OPEN_GROUP -> { // In open groups, where it's more likely that multiple users have the same name, // we display a bit of the Session ID after a user's display name for added context. - this.name?.let { - return "${this.name} (...${this.sessionID.takeLast(8)})" + name?.let { + return "$name (...${sessionID.takeLast(8)})" } return null }