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
b378cf2f
Commit
b378cf2f
authored
Sep 01, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MessageFormManager.java
parent
73dbba85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
MessageFormManager.java
...ket/android/layouthelper/chatroom/MessageFormManager.java
+7
-11
No files found.
app/src/main/java/chat/rocket/android/layouthelper/chatroom/MessageFormManager.java
View file @
b378cf2f
...
@@ -3,14 +3,13 @@ package chat.rocket.android.layouthelper.chatroom;
...
@@ -3,14 +3,13 @@ package chat.rocket.android.layouthelper.chatroom;
import
chat.rocket.android.widget.message.MessageFormLayout
;
import
chat.rocket.android.widget.message.MessageFormLayout
;
/**
/**
*
handling
MessageForm.
*
Handles
MessageForm.
*/
*/
public
class
MessageFormManager
{
public
class
MessageFormManager
{
private
final
MessageFormLayout
messageFormLayout
;
private
final
MessageFormLayout
messageFormLayout
;
private
SendMessageCallback
sendMessageCallback
;
private
SendMessageCallback
sendMessageCallback
;
public
MessageFormManager
(
MessageFormLayout
messageFormLayout
,
public
MessageFormManager
(
MessageFormLayout
messageFormLayout
,
MessageFormLayout
.
ExtraActionSelectionClickListener
callback
)
{
MessageFormLayout
.
ExtraActionSelectionClickListener
callback
)
{
this
.
messageFormLayout
=
messageFormLayout
;
this
.
messageFormLayout
=
messageFormLayout
;
init
(
callback
);
init
(
callback
);
}
}
...
@@ -24,13 +23,8 @@ public class MessageFormManager {
...
@@ -24,13 +23,8 @@ public class MessageFormManager {
this
.
sendMessageCallback
=
sendMessageCallback
;
this
.
sendMessageCallback
=
sendMessageCallback
;
}
}
public
void
clearComposingText
()
{
messageFormLayout
.
setText
(
""
);
}
public
void
onMessageSend
()
{
public
void
onMessageSend
()
{
clearComposingText
();
clearComposingText
();
messageFormLayout
.
setEnabled
(
true
);
}
}
public
void
setEditMessage
(
String
message
)
{
public
void
setEditMessage
(
String
message
)
{
...
@@ -38,12 +32,14 @@ public class MessageFormManager {
...
@@ -38,12 +32,14 @@ public class MessageFormManager {
messageFormLayout
.
setText
(
message
);
messageFormLayout
.
setText
(
message
);
}
}
public
void
clearComposingText
()
{
messageFormLayout
.
setText
(
""
);
}
private
void
sendMessage
(
String
message
)
{
private
void
sendMessage
(
String
message
)
{
if
(
sendMessageCallback
==
null
)
{
if
(
sendMessageCallback
==
null
)
{
return
;
return
;
}
}
messageFormLayout
.
setEnabled
(
false
);
sendMessageCallback
.
onSubmitText
(
message
);
sendMessageCallback
.
onSubmitText
(
message
);
}
}
...
...
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