Commit 1750d2e4 authored by Cool-fire's avatar Cool-fire

removed unnecessary imports

parent d9980439
package chat.rocket.android.userdetails.presentation
import android.util.Log
import chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import chat.rocket.android.core.lifecycle.CancelStrategy
......@@ -61,7 +60,6 @@ class UserDetailsPresenter @Inject constructor(
val utcOffset =
userEntity.utcOffset // TODO Convert UTC and display like the mockup
Log.d("profile",avatarUrl+" " + username+" " +name+" " + utcOffset)
if (avatarUrl != null || username != null || name != null || utcOffset != null) {
view.showUserDetailsAndActions(
avatarUrl = avatarUrl,
......
......@@ -103,20 +103,16 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
val userStatus = if(status != null) status.substring(0, 1).toUpperCase() + status.substring(1) else ""
text_description_status.text = userStatus
if(utcOffset != "null") {
text_description_timezone.text = utcOffset
} else {
text_title_timezone.isVisible = false
}
// We should also setup the user details listeners.
if(username != null){
text_message.setOnClickListener { presenter.createDirectMessage(username) }
val userUtcOffset = if(utcOffset != "null") utcOffset else "None"
text_description_timezone.text = userUtcOffset
text_video_call.isVisible = isVideoCallAllowed
// We should also setup the user details listeners.
username?.run {
text_message.setOnClickListener { presenter.createDirectMessage(this) }
if (isVideoCallAllowed) {
text_video_call.isVisible = true
text_video_call.setOnClickListener { presenter.toVideoConference(username) }
} else {
text_video_call.isVisible = false
text_video_call.setOnClickListener { presenter.toVideoConference(this) }
}
}
}
......
......@@ -143,6 +143,6 @@
android:id="@+id/group_user_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="image_blur, image_avatar, text_name, text_username, text_message, text_title_status, text_description_status, text_title_timezone, text_description_timezone" />
app:constraint_referenced_ids="image_blur, image_avatar, text_name, text_username, text_message, text_title_status, text_description_status, text_title_timezone, text_description_timezone, text_video_call" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
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