Commit 35fc58a7 authored by Cool-fire's avatar Cool-fire

removed hardcoded string

parent 1750d2e4
......@@ -62,7 +62,7 @@ class UserDetailsPresenter @Inject constructor(
if (avatarUrl != null || username != null || name != null || utcOffset != null) {
view.showUserDetailsAndActions(
avatarUrl = avatarUrl,
avatarUrl = avatarUrl.toString(),
name = name,
username = username,
status = userEntity.status,
......
......@@ -16,7 +16,7 @@ interface UserDetailsView : LoadingView, MessageView {
* @param isVideoCallAllowed True if the video call is allowed, false otherwise.
*/
fun showUserDetailsAndActions(
avatarUrl: String?,
avatarUrl: String,
name: String?,
username: String?,
status: String?,
......
......@@ -79,7 +79,7 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
}
override fun showUserDetailsAndActions(
avatarUrl: String?,
avatarUrl: String,
name: String?,
username: String?,
status: String?,
......@@ -103,7 +103,7 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
val userStatus = if(status != null) status.substring(0, 1).toUpperCase() + status.substring(1) else ""
text_description_status.text = userStatus
val userUtcOffset = if(utcOffset != "null") utcOffset else "None"
val userUtcOffset = if(utcOffset.equals("null")) getString(R.string.user_timezone_none) else utcOffset
text_description_timezone.text = userUtcOffset
text_video_call.isVisible = isVideoCallAllowed
......
......@@ -381,6 +381,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="timezone">Timezone</string>
<string name="status" translatable="false">Status: %1$s</string>
<string name="user_detail_status" translatable="false">Status</string>
<string name="user_timezone_none" translatable="false">None</string>
<!-- Report -->
<string name="submit">Submit</string>
......
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