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
cadc0ed5
Commit
cadc0ed5
authored
Jan 27, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spacing on messages and messages streaming
parent
44475941
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
build.gradle
app/build.gradle
+2
-2
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+4
-0
ChatRoomAdapter.kt
...n/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
+2
-1
Extensions.kt
app/src/main/java/chat/rocket/android/util/Extensions.kt
+2
-2
item_message.xml
app/src/main/res/layout/item_message.xml
+3
-2
No files found.
app/build.gradle
View file @
cadc0ed5
...
@@ -12,8 +12,8 @@ android {
...
@@ -12,8 +12,8 @@ android {
applicationId
"chat.rocket.android"
applicationId
"chat.rocket.android"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
versions
.
targetSdk
targetSdkVersion
versions
.
targetSdk
versionCode
100
3
versionCode
100
4
versionName
"2.0.0-dev
2
"
versionName
"2.0.0-dev
3
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
multiDexEnabled
true
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
cadc0ed5
...
@@ -116,6 +116,10 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
...
@@ -116,6 +116,10 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
else
->
client
.
connect
()
else
->
client
.
connect
()
}
}
launchUI
(
strategy
)
{
listenMessages
(
roomId
)
}
// TODO - when we have a proper service, we won't need to take care of connection, just
// TODO - when we have a proper service, we won't need to take care of connection, just
// subscribe and listen...
// subscribe and listen...
/*launchUI(strategy) {
/*launchUI(strategy) {
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomAdapter.kt
View file @
cadc0ed5
...
@@ -66,7 +66,7 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
...
@@ -66,7 +66,7 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
text_message_time
.
text
=
message
.
time
text_message_time
.
text
=
message
.
time
text_content
.
text
=
message
.
content
text_content
.
text
=
message
.
content
bindAttachment
(
message
,
attachment_container
,
image_attachment
,
audio_video_attachment
,
bindAttachment
(
message
,
message_attachment
,
image_attachment
,
audio_video_attachment
,
file_name
)
file_name
)
}
}
...
@@ -78,6 +78,7 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
...
@@ -78,6 +78,7 @@ class ChatRoomAdapter(private val serverUrl: String) : RecyclerView.Adapter<Chat
with
(
message
)
{
with
(
message
)
{
if
(
attachmentUrl
==
null
||
attachmentType
==
null
)
{
if
(
attachmentUrl
==
null
||
attachmentType
==
null
)
{
attachment_container
.
setVisible
(
false
)
attachment_container
.
setVisible
(
false
)
return
}
}
var
imageVisible
=
false
var
imageVisible
=
false
...
...
app/src/main/java/chat/rocket/android/util/Extensions.kt
View file @
cadc0ed5
...
@@ -13,8 +13,8 @@ fun String.ifEmpty(value: String): String {
...
@@ -13,8 +13,8 @@ fun String.ifEmpty(value: String): String {
return
this
return
this
}
}
fun
View
.
setVisible
(
v
alu
e
:
Boolean
)
{
fun
View
.
setVisible
(
v
isibl
e
:
Boolean
)
{
visibility
=
if
(
v
alu
e
)
{
visibility
=
if
(
v
isibl
e
)
{
View
.
VISIBLE
View
.
VISIBLE
}
else
{
}
else
{
View
.
GONE
View
.
GONE
...
...
app/src/main/res/layout/item_message.xml
View file @
cadc0ed5
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"
10
dp"
android:layout_marginBottom=
"
6
dp"
android:layout_marginEnd=
"@dimen/screen_edge_left_and_right_margins"
android:layout_marginEnd=
"@dimen/screen_edge_left_and_right_margins"
android:layout_marginStart=
"@dimen/screen_edge_left_and_right_margins"
android:layout_marginStart=
"@dimen/screen_edge_left_and_right_margins"
android:layout_marginTop=
"
10
dp"
>
android:layout_marginTop=
"
6
dp"
>
<include
<include
android:id=
"@+id/layout_avatar"
android:id=
"@+id/layout_avatar"
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
<!-- TODO - Use separate adapter items for messages and attachments. -->
<!-- TODO - Use separate adapter items for messages and attachments. -->
<include
<include
android:id=
"@+id/message_attachment"
layout=
"@layout/message_attachment"
layout=
"@layout/message_attachment"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
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