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
e9fda389
Unverified
Commit
e9fda389
authored
Nov 30, 2018
by
Rafael Kellermann Streit
Committed by
GitHub
Nov 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1880 from RocketChat/fix/some-fixes
[FIX] Layout fixes and Room refresh fix
parents
98a94bb1
91cc747f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
61 deletions
+57
-61
AttachmentViewHolder.kt
...t/rocket/android/chatroom/adapter/AttachmentViewHolder.kt
+2
-1
DatabaseManager.kt
app/src/main/java/chat/rocket/android/db/DatabaseManager.kt
+1
-1
item_message.xml
app/src/main/res/layout/item_message.xml
+54
-59
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/AttachmentViewHolder.kt
View file @
e9fda389
...
@@ -146,7 +146,8 @@ class AttachmentViewHolder(
...
@@ -146,7 +146,8 @@ class AttachmentViewHolder(
private
fun
bindAudioOrVideo
(
data
:
AttachmentUiModel
)
{
private
fun
bindAudioOrVideo
(
data
:
AttachmentUiModel
)
{
with
(
itemView
)
{
with
(
itemView
)
{
text_file_name
.
content
=
data
.
title
file_name
.
isVisible
=
data
.
hasTitle
file_name
.
text
=
data
.
title
file_text
.
isVisible
=
data
.
hasText
file_text
.
isVisible
=
data
.
hasText
file_text
.
text
=
data
.
text
file_text
.
text
=
data
.
text
...
...
app/src/main/java/chat/rocket/android/db/DatabaseManager.kt
View file @
e9fda389
...
@@ -170,7 +170,7 @@ class DatabaseManager(val context: Application, val serverUrl: String) {
...
@@ -170,7 +170,7 @@ class DatabaseManager(val context: Application, val serverUrl: String) {
fun
processRooms
(
rooms
:
List
<
ChatRoom
>)
{
fun
processRooms
(
rooms
:
List
<
ChatRoom
>)
{
launch
(
dbManagerContext
)
{
launch
(
dbManagerContext
)
{
val
entities
=
rooms
.
map
{
mapChatRoom
(
it
)
}
val
entities
=
rooms
.
map
{
mapChatRoom
(
it
)
}
sendOperation
(
Operation
.
InsertRooms
(
entities
))
sendOperation
(
Operation
.
Clean
InsertRooms
(
entities
))
}
}
}
}
...
...
app/src/main/res/layout/item_message.xml
View file @
e9fda389
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/
text_sen
der"
/>
app:layout_constraintTop_toTopOf=
"@+id/
message_hea
der"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/new_messages_notif"
android:id=
"@+id/new_messages_notif"
...
@@ -88,17 +88,25 @@
...
@@ -88,17 +88,25 @@
android:background=
"@color/colorRed"
/>
android:background=
"@color/colorRed"
/>
</LinearLayout>
</LinearLayout>
<TextView
<LinearLayout
android:id=
"@+id/text_sender"
android:id=
"@+id/message_header"
style=
"@style/Sender.Name.TextView"
android:layout_width=
"0dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginStart=
"16dp"
android:layout_marginStart=
"16dp"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintLeft_toRightOf=
"@+id/layout_avatar"
app:layout_constraintLeft_toRightOf=
"@+id/layout_avatar"
app:layout_constraintStart_toEndOf=
"@+id/layout_avatar"
app:layout_constraintStart_toEndOf=
"@+id/layout_avatar"
app:layout_constraintTop_toBottomOf=
"@+id/day_marker_layout"
app:layout_constraintEnd_toEndOf=
"parent"
tools:text=
"Ronald Perkins"
/>
app:layout_constraintTop_toBottomOf=
"@+id/day_marker_layout"
>
<TextView
android:id=
"@+id/text_sender"
style=
"@style/Sender.Name.TextView"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_marginEnd=
"8dp"
tools:text=
"User Name with long name"
/>
<TextView
<TextView
android:id=
"@+id/text_message_time"
android:id=
"@+id/text_message_time"
...
@@ -106,9 +114,6 @@
...
@@ -106,9 +114,6 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"4dp"
android:layout_marginStart=
"4dp"
app:layout_constraintBaseline_toBaselineOf=
"@+id/text_sender"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintStart_toEndOf=
"@+id/text_sender"
tools:text=
"11:45 PM"
/>
tools:text=
"11:45 PM"
/>
<TextView
<TextView
...
@@ -119,9 +124,6 @@
...
@@ -119,9 +124,6 @@
android:text=
"@string/msg_edited"
android:text=
"@string/msg_edited"
android:textStyle=
"italic"
android:textStyle=
"italic"
android:visibility=
"gone"
android:visibility=
"gone"
app:layout_constraintBaseline_toBaselineOf=
"@+id/text_sender"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintStart_toEndOf=
"@+id/text_message_time"
tools:visibility=
"visible"
/>
tools:visibility=
"visible"
/>
<ImageView
<ImageView
...
@@ -132,10 +134,6 @@
...
@@ -132,10 +134,6 @@
android:layout_marginStart=
"4dp"
android:layout_marginStart=
"4dp"
android:layout_marginTop=
"2dp"
android:layout_marginTop=
"2dp"
android:visibility=
"gone"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"@+id/text_sender"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintStart_toEndOf=
"@+id/text_edit_indicator"
app:layout_constraintTop_toTopOf=
"@+id/text_sender"
app:srcCompat=
"@drawable/ic_action_message_star_24dp"
app:srcCompat=
"@drawable/ic_action_message_star_24dp"
tools:visibility=
"visible"
/>
tools:visibility=
"visible"
/>
...
@@ -144,12 +142,9 @@
...
@@ -144,12 +142,9 @@
android:layout_width=
"24dp"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_height=
"24dp"
android:visibility=
"gone"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"@+id/text_sender"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintStart_toEndOf=
"@+id/image_star_indicator"
app:layout_constraintTop_toTopOf=
"@+id/text_sender"
app:srcCompat=
"@drawable/ic_check_unread_24dp"
app:srcCompat=
"@drawable/ic_check_unread_24dp"
tools:visibility=
"visible"
/>
tools:visibility=
"visible"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/text_content"
android:id=
"@+id/text_content"
...
@@ -160,8 +155,8 @@
...
@@ -160,8 +155,8 @@
android:layout_marginEnd=
"4dp"
android:layout_marginEnd=
"4dp"
android:layout_marginBottom=
"2dp"
android:layout_marginBottom=
"2dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/
text_sen
der"
app:layout_constraintStart_toStartOf=
"@+id/
message_hea
der"
app:layout_constraintTop_toBottomOf=
"@+id/
text_sen
der"
app:layout_constraintTop_toBottomOf=
"@+id/
message_hea
der"
tools:text=
"This is a multiline chat message from Bertie that will take more than just one line of text. I have sure that everything is amazing!"
/>
tools:text=
"This is a multiline chat message from Bertie that will take more than just one line of text. I have sure that everything is amazing!"
/>
<include
<include
...
...
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