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
2d743c93
Commit
2d743c93
authored
Dec 06, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX #64 add userData subscription
parent
e05f3311
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
RocketChatWebSocketThread.java
...hat/rocket/android/service/RocketChatWebSocketThread.java
+2
-0
UserDataSubscriber.java
...a/chat/rocket/android/service/ddp/UserDataSubscriber.java
+29
-0
No files found.
app/src/main/java/chat/rocket/android/service/RocketChatWebSocketThread.java
View file @
2d743c93
...
...
@@ -15,6 +15,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
import
chat.rocket.android.realm_helper.RealmStore
;
import
chat.rocket.android.service.ddp.ActiveUsersSubscriber
;
import
chat.rocket.android.service.ddp.LoginServiceConfigurationSubscriber
;
import
chat.rocket.android.service.ddp.UserDataSubscriber
;
import
chat.rocket.android.service.observer.GetUsersOfRoomsProcedureObserver
;
import
chat.rocket.android.service.observer.LoadMessageProcedureObserver
;
import
chat.rocket.android.service.observer.MethodCallObserver
;
...
...
@@ -36,6 +37,7 @@ public class RocketChatWebSocketThread extends HandlerThread {
private
static
final
Class
[]
REGISTERABLE_CLASSES
=
{
LoginServiceConfigurationSubscriber
.
class
,
ActiveUsersSubscriber
.
class
,
UserDataSubscriber
.
class
,
TokenLoginObserver
.
class
,
MethodCallObserver
.
class
,
SessionObserver
.
class
,
...
...
app/src/main/java/chat/rocket/android/service/ddp/UserDataSubscriber.java
0 → 100644
View file @
2d743c93
package
chat
.
rocket
.
android
.
service
.
ddp
;
import
android.content.Context
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
io.realm.RealmObject
;
/**
* "userData" subscriber.
*/
public
class
UserDataSubscriber
extends
AbstractDDPDocEventSubscriber
{
public
UserDataSubscriber
(
Context
context
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
super
(
context
,
realmHelper
,
ddpClient
);
}
@Override
protected
String
getSubscriptionName
()
{
return
"userData"
;
}
@Override
protected
String
getSubscriptionCallbackName
()
{
return
"users"
;
}
@Override
protected
Class
<?
extends
RealmObject
>
getModelClass
()
{
return
User
.
class
;
}
}
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