Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
1750d2e4
Commit
1750d2e4
authored
Apr 29, 2019
by
Cool-fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecessary imports
parent
d9980439
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
UserDetailsPresenter.kt
.../android/userdetails/presentation/UserDetailsPresenter.kt
+0
-2
UserDetailsFragment.kt
...chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
+8
-12
fragment_user_details.xml
app/src/main/res/layout/fragment_user_details.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/userdetails/presentation/UserDetailsPresenter.kt
View file @
1750d2e4
package
chat.rocket.android.userdetails.presentation
package
chat.rocket.android.userdetails.presentation
import
android.util.Log
import
chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import
chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import
chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import
chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.core.lifecycle.CancelStrategy
...
@@ -61,7 +60,6 @@ class UserDetailsPresenter @Inject constructor(
...
@@ -61,7 +60,6 @@ class UserDetailsPresenter @Inject constructor(
val
utcOffset
=
val
utcOffset
=
userEntity
.
utcOffset
// TODO Convert UTC and display like the mockup
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
)
{
if
(
avatarUrl
!=
null
||
username
!=
null
||
name
!=
null
||
utcOffset
!=
null
)
{
view
.
showUserDetailsAndActions
(
view
.
showUserDetailsAndActions
(
avatarUrl
=
avatarUrl
,
avatarUrl
=
avatarUrl
,
...
...
app/src/main/java/chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
View file @
1750d2e4
...
@@ -103,20 +103,16 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
...
@@ -103,20 +103,16 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
val
userStatus
=
if
(
status
!=
null
)
status
.
substring
(
0
,
1
).
toUpperCase
()
+
status
.
substring
(
1
)
else
""
val
userStatus
=
if
(
status
!=
null
)
status
.
substring
(
0
,
1
).
toUpperCase
()
+
status
.
substring
(
1
)
else
""
text_description_status
.
text
=
userStatus
text_description_status
.
text
=
userStatus
if
(
utcOffset
!=
"null"
)
{
val
userUtcOffset
=
if
(
utcOffset
!=
"null"
)
utcOffset
else
"None"
text_description_timezone
.
text
=
utcOffset
text_description_timezone
.
text
=
userUtcOffset
}
else
{
text_title_timezone
.
isVisible
=
false
}
// We should also setup the user details listeners.
if
(
username
!=
null
){
text_message
.
setOnClickListener
{
presenter
.
createDirectMessage
(
username
)
}
text_video_call
.
isVisible
=
isVideoCallAllowed
// We should also setup the user details listeners.
username
?.
run
{
text_message
.
setOnClickListener
{
presenter
.
createDirectMessage
(
this
)
}
if
(
isVideoCallAllowed
)
{
if
(
isVideoCallAllowed
)
{
text_video_call
.
isVisible
=
true
text_video_call
.
setOnClickListener
{
presenter
.
toVideoConference
(
this
)
}
text_video_call
.
setOnClickListener
{
presenter
.
toVideoConference
(
username
)
}
}
else
{
text_video_call
.
isVisible
=
false
}
}
}
}
}
}
...
...
app/src/main/res/layout/fragment_user_details.xml
View file @
1750d2e4
...
@@ -143,6 +143,6 @@
...
@@ -143,6 +143,6 @@
android:id=
"@+id/group_user_details"
android:id=
"@+id/group_user_details"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"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>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</ScrollView>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment