Commit 95ea9692 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Removes unneeded variable.

parent 008f9df4
......@@ -29,16 +29,13 @@ class UserHelper @Inject constructor(
* If setting 'Use_Real_Name' is true then the real name will be given, otherwise the username
* without the '@' is yielded.
*/
fun displayName(user: SimpleUser): String {
val displayName: String? = getCurrentServerInteractor.get()?.let {
if (settingsRepository.get(it).useRealName()) {
user.name
} else {
user.username
}
fun displayName(user: SimpleUser) = getCurrentServerInteractor.get()?.let {
if (settingsRepository.get(it).useRealName()) {
user.name
} else {
user.username
}
return displayName ?: ""
}
}.orEmpty()
/**
* Whether current [User] is admin on the current server.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment