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
9b4af327
Unverified
Commit
9b4af327
authored
Oct 19, 2018
by
Rafael Kellermann Streit
Committed by
GitHub
Oct 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1780 from RocketChat/beta
[CHORE] Merge BETA into DEVELOP
parents
71410e16
65de72ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
build.gradle
app/build.gradle
+1
-1
RoomViewHolder.kt
...a/chat/rocket/android/chatrooms/adapter/RoomViewHolder.kt
+2
-1
MessageParser.kt
...src/main/java/chat/rocket/android/helper/MessageParser.kt
+2
-1
No files found.
app/build.gradle
View file @
9b4af327
...
@@ -16,7 +16,7 @@ android {
...
@@ -16,7 +16,7 @@ android {
applicationId
"chat.rocket.android"
applicationId
"chat.rocket.android"
minSdkVersion
versions
.
minSdk
minSdkVersion
versions
.
minSdk
targetSdkVersion
versions
.
targetSdk
targetSdkVersion
versions
.
targetSdk
versionCode
204
7
versionCode
204
8
versionName
"3.0.0"
versionName
"3.0.0"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
multiDexEnabled
true
...
...
app/src/main/java/chat/rocket/android/chatrooms/adapter/RoomViewHolder.kt
View file @
9b4af327
...
@@ -11,6 +11,7 @@ import chat.rocket.common.model.RoomType
...
@@ -11,6 +11,7 @@ import chat.rocket.common.model.RoomType
import
chat.rocket.common.model.UserStatus
import
chat.rocket.common.model.UserStatus
import
kotlinx.android.synthetic.main.item_chat.view.*
import
kotlinx.android.synthetic.main.item_chat.view.*
import
kotlinx.android.synthetic.main.unread_messages_badge.view.*
import
kotlinx.android.synthetic.main.unread_messages_badge.view.*
import
ru.noties.markwon.Markwon
class
RoomViewHolder
(
itemView
:
View
,
private
val
listener
:
(
RoomUiModel
)
->
Unit
)
:
ViewHolder
<
RoomItemHolder
>(
itemView
)
{
class
RoomViewHolder
(
itemView
:
View
,
private
val
listener
:
(
RoomUiModel
)
->
Unit
)
:
ViewHolder
<
RoomItemHolder
>(
itemView
)
{
...
@@ -32,7 +33,7 @@ class RoomViewHolder(itemView: View, private val listener: (RoomUiModel) -> Unit
...
@@ -32,7 +33,7 @@ class RoomViewHolder(itemView: View, private val listener: (RoomUiModel) -> Unit
if
(
room
.
lastMessage
!=
null
)
{
if
(
room
.
lastMessage
!=
null
)
{
text_last_message
.
isVisible
=
true
text_last_message
.
isVisible
=
true
text_last_message
.
text
=
room
.
lastMessage
text_last_message
.
text
=
Markwon
.
markdown
(
context
,
room
.
lastMessage
.
toString
()).
toString
()
}
else
{
}
else
{
text_last_message
.
isGone
=
true
text_last_message
.
isGone
=
true
}
}
...
...
app/src/main/java/chat/rocket/android/helper/MessageParser.kt
View file @
9b4af327
...
@@ -115,6 +115,7 @@ class MessageParser @Inject constructor(
...
@@ -115,6 +115,7 @@ class MessageParser @Inject constructor(
}
}
class
StrongEmphasisVisitor
:
AbstractVisitor
()
{
class
StrongEmphasisVisitor
:
AbstractVisitor
()
{
override
fun
visit
(
strongEmphasis
:
StrongEmphasis
)
{
override
fun
visit
(
strongEmphasis
:
StrongEmphasis
)
{
if
(
strongEmphasis
.
openingDelimiter
==
"__"
&&
strongEmphasis
.
firstChild
!=
null
)
{
if
(
strongEmphasis
.
openingDelimiter
==
"__"
&&
strongEmphasis
.
firstChild
!=
null
)
{
val
child
=
strongEmphasis
.
firstChild
val
child
=
strongEmphasis
.
firstChild
...
@@ -145,7 +146,7 @@ class MessageParser @Inject constructor(
...
@@ -145,7 +146,7 @@ class MessageParser @Inject constructor(
var
offset
=
0
var
offset
=
0
mentions
.
forEach
{
mentions
.
forEach
{
val
mentionMe
=
it
==
currentUser
||
it
==
"@all"
||
it
==
"@here"
val
mentionMe
=
it
==
"@$currentUser"
||
it
==
"@all"
||
it
==
"@here"
offset
=
text
.
indexOf
(
string
=
it
,
startIndex
=
offset
,
ignoreCase
=
false
)
offset
=
text
.
indexOf
(
string
=
it
,
startIndex
=
offset
,
ignoreCase
=
false
)
while
(
offset
>
-
1
)
{
while
(
offset
>
-
1
)
{
val
textColor
=
if
(
mentionMe
)
myselfTextColor
else
othersTextColor
val
textColor
=
if
(
mentionMe
)
myselfTextColor
else
othersTextColor
...
...
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