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
649e1a9f
Unverified
Commit
649e1a9f
authored
Jul 11, 2018
by
Filipe de Lima Brito
Committed by
GitHub
Jul 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1466 from shubhsherl/bug_1464
[FIX] Message retain
parents
33ed32da
075d8054
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
ChatRoomView.kt
...chat/rocket/android/chatroom/presentation/ChatRoomView.kt
+1
-1
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+9
-6
No files found.
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomView.kt
View file @
649e1a9f
...
@@ -111,7 +111,7 @@ interface ChatRoomView : LoadingView, MessageView {
...
@@ -111,7 +111,7 @@ interface ChatRoomView : LoadingView, MessageView {
/**
/**
* Clears the message composition.
* Clears the message composition.
*/
*/
fun
clearMessageComposition
()
fun
clearMessageComposition
(
deleteMessage
:
Boolean
)
fun
showInvalidFileSize
(
fileSize
:
Int
,
maxFileSize
:
Int
)
fun
showInvalidFileSize
(
fileSize
:
Int
,
maxFileSize
:
Int
)
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
649e1a9f
...
@@ -522,15 +522,16 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -522,15 +522,16 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
ui
{
ui
{
button_send
.
isEnabled
=
true
button_send
.
isEnabled
=
true
text_message
.
isEnabled
=
true
text_message
.
isEnabled
=
true
clearMessageComposition
()
clearMessageComposition
(
true
)
}
}
}
}
override
fun
clearMessageComposition
()
{
override
fun
clearMessageComposition
(
deleteMessage
:
Boolean
)
{
ui
{
ui
{
citation
=
null
citation
=
null
editingMessageId
=
null
editingMessageId
=
null
if
(
deleteMessage
)
text_message
.
textContent
=
""
text_message
.
textContent
=
""
actionSnackbar
.
dismiss
()
actionSnackbar
.
dismiss
()
}
}
...
@@ -782,7 +783,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -782,7 +783,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
var
textMessage
=
citation
?:
""
var
textMessage
=
citation
?:
""
textMessage
+=
text_message
.
textContent
textMessage
+=
text_message
.
textContent
sendMessage
(
textMessage
)
sendMessage
(
textMessage
)
clearMessageComposition
()
clearMessageComposition
(
true
)
}
}
button_show_attachment_options
.
setOnClickListener
{
button_show_attachment_options
.
setOnClickListener
{
...
@@ -874,10 +875,12 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -874,10 +875,12 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
private
fun
setupActionSnackbar
()
{
private
fun
setupActionSnackbar
()
{
actionSnackbar
=
ActionSnackbar
.
make
(
message_list_container
,
parser
=
parser
)
actionSnackbar
=
ActionSnackbar
.
make
(
message_list_container
,
parser
=
parser
)
actionSnackbar
.
cancelView
.
setOnClickListener
{
actionSnackbar
.
cancelView
.
setOnClickListener
{
clearMessageComposition
()
clearMessageComposition
(
false
)
if
(
text_message
.
textContent
.
isEmpty
())
{
KeyboardHelper
.
showSoftKeyboard
(
text_message
)
KeyboardHelper
.
showSoftKeyboard
(
text_message
)
}
}
}
}
}
private
fun
subscribeComposeTextMessage
()
{
private
fun
subscribeComposeTextMessage
()
{
val
editTextObservable
=
text_message
.
asObservable
()
val
editTextObservable
=
text_message
.
asObservable
()
...
...
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