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
56692224
Commit
56692224
authored
Jan 09, 2017
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename PushHelper::PushUpdate to PushHelper::Params
parent
6444696a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
PushHelper.java
app/src/main/java/chat/rocket/android/api/PushHelper.java
+6
-7
No files found.
app/src/main/java/chat/rocket/android/api/PushHelper.java
View file @
56692224
...
...
@@ -23,10 +23,9 @@ public class PushHelper extends MethodCallHelper {
public
Task
<
Void
>
pushUpdate
(
@NonNull
String
pushId
,
@NonNull
String
token
,
@Nullable
String
userId
)
{
return
call
(
"raix:push-update"
,
TIMEOUT_MS
,
()
->
{
JSONObject
param
=
new
PushUpdate
(
pushId
,
token
,
userId
).
toJson
();
return
new
JSONArray
().
put
(
param
);
}).
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
return
call
(
"raix:push-update"
,
TIMEOUT_MS
,
()
->
new
JSONArray
().
put
(
new
Params
(
pushId
,
token
,
userId
).
toJson
()))
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
}
public
Task
<
Void
>
pushSetUser
(
String
pushId
)
{
...
...
@@ -34,19 +33,19 @@ public class PushHelper extends MethodCallHelper {
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
));
}
private
static
class
P
ushUpdate
{
private
static
class
P
arams
{
private
String
pushId
;
private
String
gcmToken
;
private
String
userId
;
PushUpdate
(
@NonNull
String
pushId
,
@NonNull
String
gcmToken
,
@Nullable
String
userId
)
{
public
Params
(
@NonNull
String
pushId
,
@NonNull
String
gcmToken
,
@Nullable
String
userId
)
{
this
.
pushId
=
pushId
;
this
.
gcmToken
=
gcmToken
;
this
.
userId
=
userId
;
}
JSONObject
toJson
()
throws
JSONException
{
public
JSONObject
toJson
()
throws
JSONException
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"id"
,
pushId
);
param
.
put
(
"appName"
,
"main"
);
...
...
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