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
bb01f6a6
Commit
bb01f6a6
authored
Aug 18, 2017
by
Rafael Kellermann Streit
Committed by
GitHub
Aug 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #400 from filipedelimabrito/iss321
Spotlight changes.
parents
b9d36651
5c8721d7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
MethodCallHelper.java
...c/main/java/chat/rocket/android/api/MethodCallHelper.java
+3
-2
SidebarMainPresenter.java
...rocket/android/fragment/sidebar/SidebarMainPresenter.java
+1
-1
AddDirectMessageDialogFragment.java
...agment/sidebar/dialog/AddDirectMessageDialogFragment.java
+2
-1
No files found.
app/src/main/java/chat/rocket/android/api/MethodCallHelper.java
View file @
bb01f6a6
...
@@ -365,9 +365,10 @@ public class MethodCallHelper {
...
@@ -365,9 +365,10 @@ public class MethodCallHelper {
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
}
}
public
Task
<
Void
>
createDirectMessage
(
final
String
username
)
{
public
Task
<
String
>
createDirectMessage
(
final
String
username
)
{
return
call
(
"createDirectMessage"
,
TIMEOUT_MS
,
()
->
new
JSONArray
().
put
(
username
))
return
call
(
"createDirectMessage"
,
TIMEOUT_MS
,
()
->
new
JSONArray
().
put
(
username
))
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
.
onSuccessTask
(
CONVERT_TO_JSON_OBJECT
)
.
onSuccessTask
(
task
->
Task
.
forResult
(
task
.
getResult
().
getString
(
"rid"
)));
}
}
/**
/**
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/SidebarMainPresenter.java
View file @
bb01f6a6
...
@@ -98,7 +98,7 @@ public class SidebarMainPresenter extends BasePresenter<SidebarMainContract.View
...
@@ -98,7 +98,7 @@ public class SidebarMainPresenter extends BasePresenter<SidebarMainContract.View
methodCallHelper
.
createDirectMessage
(
username
)
methodCallHelper
.
createDirectMessage
(
username
)
.
continueWithTask
(
task
->
{
.
continueWithTask
(
task
->
{
if
(
task
.
isCompleted
())
{
if
(
task
.
isCompleted
())
{
rocketChatCache
.
setSelectedRoomId
(
spotlight
.
getId
()
+
userId
);
rocketChatCache
.
setSelectedRoomId
(
task
.
getResult
()
);
}
}
return
null
;
return
null
;
});
});
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AddDirectMessageDialogFragment.java
View file @
bb01f6a6
...
@@ -105,6 +105,7 @@ public class AddDirectMessageDialogFragment extends AbstractAddRoomDialogFragmen
...
@@ -105,6 +105,7 @@ public class AddDirectMessageDialogFragment extends AbstractAddRoomDialogFragmen
protected
Task
<
Void
>
getMethodCallForSubmitAction
()
{
protected
Task
<
Void
>
getMethodCallForSubmitAction
()
{
String
username
=
String
username
=
((
TextView
)
getDialog
().
findViewById
(
R
.
id
.
editor_username
)).
getText
().
toString
();
((
TextView
)
getDialog
().
findViewById
(
R
.
id
.
editor_username
)).
getText
().
toString
();
return
methodCall
.
createDirectMessage
(
username
);
return
methodCall
.
createDirectMessage
(
username
)
.
onSuccess
(
task
->
null
);
}
}
}
}
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