mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Remove redundant this
This commit is contained in:
parent
95657195e6
commit
90dca7149a
@ -37,14 +37,14 @@ class Contact(val sessionID: String) {
|
|||||||
* The name to display in the UI. For local use only.
|
* The name to display in the UI. For local use only.
|
||||||
*/
|
*/
|
||||||
fun displayName(context: ContactContext): String? {
|
fun displayName(context: ContactContext): String? {
|
||||||
this.nickname?.let { return it }
|
nickname?.let { return it }
|
||||||
return when (context) {
|
return when (context) {
|
||||||
ContactContext.REGULAR -> this.name
|
ContactContext.REGULAR -> name
|
||||||
ContactContext.OPEN_GROUP -> {
|
ContactContext.OPEN_GROUP -> {
|
||||||
// In open groups, where it's more likely that multiple users have the same name,
|
// 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.
|
// we display a bit of the Session ID after a user's display name for added context.
|
||||||
this.name?.let {
|
name?.let {
|
||||||
return "${this.name} (...${this.sessionID.takeLast(8)})"
|
return "$name (...${sessionID.takeLast(8)})"
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user