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
7683da05
Commit
7683da05
authored
Dec 16, 2016
by
Tiago Cunha
Committed by
Yusuke Iwaki
Dec 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed classes (fix typo)
parent
9c34af88
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
76 additions
and
76 deletions
+76
-76
DDPClientWrapper.java
...c/main/java/chat/rocket/android/api/DDPClientWrapper.java
+4
-4
FileUploadingHelper.java
...ain/java/chat/rocket/android/api/FileUploadingHelper.java
+1
-1
MethodCallHelper.java
...c/main/java/chat/rocket/android/api/MethodCallHelper.java
+2
-2
Registrable.java
...rc/main/java/chat/rocket/android/service/Registrable.java
+1
-1
RocketChatWebSocketThread.java
...hat/rocket/android/service/RocketChatWebSocketThread.java
+9
-9
AbstractDDPDocEventSubscriber.java
...et/android/service/ddp/AbstractDDPDocEventSubscriber.java
+5
-5
AbstractBaseSubscriber.java
...cket/android/service/ddp/base/AbstractBaseSubscriber.java
+2
-2
ActiveUsersSubscriber.java
...ocket/android/service/ddp/base/ActiveUsersSubscriber.java
+2
-2
LoginServiceConfigurationSubscriber.java
...service/ddp/base/LoginServiceConfigurationSubscriber.java
+2
-2
UserDataSubscriber.java
...t/rocket/android/service/ddp/base/UserDataSubscriber.java
+2
-2
AbstractStreamNotifyEventSubscriber.java
...rvice/ddp/stream/AbstractStreamNotifyEventSubscriber.java
+2
-2
AbstractStreamNotifyUserEventSubscriber.java
...e/ddp/stream/AbstractStreamNotifyUserEventSubscriber.java
+2
-2
StreamNotifyUserSubscriptionsChanged.java
...vice/ddp/stream/StreamNotifyUserSubscriptionsChanged.java
+2
-2
StreamRoomMessage.java
.../rocket/android/service/ddp/stream/StreamRoomMessage.java
+2
-2
AbstractRocketChatCacheObserver.java
...oid/service/internal/AbstractRocketChatCacheObserver.java
+2
-2
StreamRoomMessageManager.java
...et/android/service/internal/StreamRoomMessageManager.java
+5
-5
AbstractModelObserver.java
...ocket/android/service/observer/AbstractModelObserver.java
+5
-5
CurrentUserObserver.java
.../rocket/android/service/observer/CurrentUserObserver.java
+6
-6
FileUploadingToS3Observer.java
...t/android/service/observer/FileUploadingToS3Observer.java
+2
-2
FileUploadingWithUfsObserver.java
...ndroid/service/observer/FileUploadingWithUfsObserver.java
+2
-2
GetUsersOfRoomsProcedureObserver.java
...id/service/observer/GetUsersOfRoomsProcedureObserver.java
+2
-2
LoadMessageProcedureObserver.java
...ndroid/service/observer/LoadMessageProcedureObserver.java
+2
-2
MethodCallObserver.java
...t/rocket/android/service/observer/MethodCallObserver.java
+2
-2
NewMessageObserver.java
...t/rocket/android/service/observer/NewMessageObserver.java
+2
-2
NotificationItemObserver.java
...et/android/service/observer/NotificationItemObserver.java
+2
-2
ReactiveNotificationManager.java
...android/service/observer/ReactiveNotificationManager.java
+2
-2
SessionObserver.java
...chat/rocket/android/service/observer/SessionObserver.java
+2
-2
TokenLoginObserver.java
...t/rocket/android/service/observer/TokenLoginObserver.java
+2
-2
No files found.
app/src/main/java/chat/rocket/android/api/DDPClientWraper.java
→
app/src/main/java/chat/rocket/android/api/DDPClientWrap
p
er.java
View file @
7683da05
...
@@ -17,11 +17,11 @@ import rx.Observable;
...
@@ -17,11 +17,11 @@ import rx.Observable;
/**
/**
* DDP client wrapper.
* DDP client wrapper.
*/
*/
public
class
DDPClientWraper
{
public
class
DDPClientWrap
p
er
{
private
final
DDPClient
ddpClient
;
private
final
DDPClient
ddpClient
;
private
final
String
hostname
;
private
final
String
hostname
;
private
DDPClientWraper
(
String
hostname
)
{
private
DDPClientWrap
p
er
(
String
hostname
)
{
ddpClient
=
new
DDPClient
(
OkHttpHelper
.
getClientForWebSocket
());
ddpClient
=
new
DDPClient
(
OkHttpHelper
.
getClientForWebSocket
());
this
.
hostname
=
hostname
;
this
.
hostname
=
hostname
;
}
}
...
@@ -29,8 +29,8 @@ public class DDPClientWraper {
...
@@ -29,8 +29,8 @@ public class DDPClientWraper {
/**
/**
* create new API client instance.
* create new API client instance.
*/
*/
public
static
DDPClientWraper
create
(
String
hostname
)
{
public
static
DDPClientWrap
p
er
create
(
String
hostname
)
{
return
new
DDPClientWraper
(
hostname
);
return
new
DDPClientWrap
p
er
(
hostname
);
}
}
/**
/**
...
...
app/src/main/java/chat/rocket/android/api/FileUploadingHelper.java
View file @
7683da05
...
@@ -16,7 +16,7 @@ public class FileUploadingHelper extends MethodCallHelper {
...
@@ -16,7 +16,7 @@ public class FileUploadingHelper extends MethodCallHelper {
super
(
context
,
serverConfigId
);
super
(
context
,
serverConfigId
);
}
}
public
FileUploadingHelper
(
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
public
FileUploadingHelper
(
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
realmHelper
,
ddpClient
);
super
(
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/api/MethodCallHelper.java
View file @
7683da05
...
@@ -35,7 +35,7 @@ public class MethodCallHelper {
...
@@ -35,7 +35,7 @@ public class MethodCallHelper {
task
->
Task
.
forResult
(
new
JSONArray
(
task
.
getResult
()));
task
->
Task
.
forResult
(
new
JSONArray
(
task
.
getResult
()));
protected
final
Context
context
;
protected
final
Context
context
;
protected
final
RealmHelper
realmHelper
;
protected
final
RealmHelper
realmHelper
;
protected
final
DDPClientWraper
ddpClient
;
protected
final
DDPClientWrap
p
er
ddpClient
;
@Deprecated
@Deprecated
/**
/**
...
@@ -57,7 +57,7 @@ public class MethodCallHelper {
...
@@ -57,7 +57,7 @@ public class MethodCallHelper {
/**
/**
* initialize with RealmHelper and DDPClient.
* initialize with RealmHelper and DDPClient.
*/
*/
public
MethodCallHelper
(
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
public
MethodCallHelper
(
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
this
.
context
=
null
;
this
.
context
=
null
;
this
.
realmHelper
=
realmHelper
;
this
.
realmHelper
=
realmHelper
;
this
.
ddpClient
=
ddpClient
;
this
.
ddpClient
=
ddpClient
;
...
...
app/src/main/java/chat/rocket/android/service/Regist
e
rable.java
→
app/src/main/java/chat/rocket/android/service/Registrable.java
View file @
7683da05
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service;
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service;
/**
/**
* interface for observer and ddp_subscription.
* interface for observer and ddp_subscription.
*/
*/
public
interface
Regist
e
rable
{
public
interface
Registrable
{
/**
/**
* register.
* register.
*/
*/
...
...
app/src/main/java/chat/rocket/android/service/RocketChatWebSocketThread.java
View file @
7683da05
...
@@ -11,7 +11,7 @@ import java.util.Iterator;
...
@@ -11,7 +11,7 @@ import java.util.Iterator;
import
bolts.Continuation
;
import
bolts.Continuation
;
import
bolts.Task
;
import
bolts.Task
;
import
bolts.TaskCompletionSource
;
import
bolts.TaskCompletionSource
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
...
@@ -60,8 +60,8 @@ public class RocketChatWebSocketThread extends HandlerThread {
...
@@ -60,8 +60,8 @@ public class RocketChatWebSocketThread extends HandlerThread {
private
final
String
serverConfigId
;
private
final
String
serverConfigId
;
private
final
RealmHelper
defaultRealm
;
private
final
RealmHelper
defaultRealm
;
private
final
RealmHelper
serverConfigRealm
;
private
final
RealmHelper
serverConfigRealm
;
private
final
ArrayList
<
Regist
e
rable
>
listeners
=
new
ArrayList
<>();
private
final
ArrayList
<
Registrable
>
listeners
=
new
ArrayList
<>();
private
DDPClientWraper
ddpClient
;
private
DDPClientWrap
p
er
ddpClient
;
private
boolean
listenersRegistered
;
private
boolean
listenersRegistered
;
private
RocketChatWebSocketThread
(
Context
appContext
,
String
serverConfigId
)
{
private
RocketChatWebSocketThread
(
Context
appContext
,
String
serverConfigId
)
{
...
@@ -157,7 +157,7 @@ public class RocketChatWebSocketThread extends HandlerThread {
...
@@ -157,7 +157,7 @@ public class RocketChatWebSocketThread extends HandlerThread {
private
void
prepareWebSocket
(
String
hostname
)
{
private
void
prepareWebSocket
(
String
hostname
)
{
if
(
ddpClient
==
null
||
!
ddpClient
.
isConnected
())
{
if
(
ddpClient
==
null
||
!
ddpClient
.
isConnected
())
{
ddpClient
=
DDPClientWraper
.
create
(
hostname
);
ddpClient
=
DDPClientWrap
p
er
.
create
(
hostname
);
}
}
}
}
...
@@ -233,11 +233,11 @@ public class RocketChatWebSocketThread extends HandlerThread {
...
@@ -233,11 +233,11 @@ public class RocketChatWebSocketThread extends HandlerThread {
for
(
Class
clazz
:
REGISTERABLE_CLASSES
)
{
for
(
Class
clazz
:
REGISTERABLE_CLASSES
)
{
try
{
try
{
Constructor
ctor
=
clazz
.
getConstructor
(
Context
.
class
,
String
.
class
,
RealmHelper
.
class
,
Constructor
ctor
=
clazz
.
getConstructor
(
Context
.
class
,
String
.
class
,
RealmHelper
.
class
,
DDPClientWraper
.
class
);
DDPClientWrap
p
er
.
class
);
Object
obj
=
ctor
.
newInstance
(
appContext
,
hostname
,
serverConfigRealm
,
ddpClient
);
Object
obj
=
ctor
.
newInstance
(
appContext
,
hostname
,
serverConfigRealm
,
ddpClient
);
if
(
obj
instanceof
Regist
e
rable
)
{
if
(
obj
instanceof
Registrable
)
{
Regist
erable
registerable
=
(
Registe
rable
)
obj
;
Regist
rable
registerable
=
(
Regist
rable
)
obj
;
registerable
.
register
();
registerable
.
register
();
listeners
.
add
(
registerable
);
listeners
.
add
(
registerable
);
}
}
...
@@ -253,9 +253,9 @@ public class RocketChatWebSocketThread extends HandlerThread {
...
@@ -253,9 +253,9 @@ public class RocketChatWebSocketThread extends HandlerThread {
return
;
return
;
}
}
Iterator
<
Regist
e
rable
>
iterator
=
listeners
.
iterator
();
Iterator
<
Registrable
>
iterator
=
listeners
.
iterator
();
while
(
iterator
.
hasNext
())
{
while
(
iterator
.
hasNext
())
{
Regist
e
rable
registerable
=
iterator
.
next
();
Registrable
registerable
=
iterator
.
next
();
registerable
.
unregister
();
registerable
.
unregister
();
iterator
.
remove
();
iterator
.
remove
();
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/AbstractDDPDocEventSubscriber.java
View file @
7683da05
...
@@ -9,25 +9,25 @@ import org.json.JSONException;
...
@@ -9,25 +9,25 @@ import org.json.JSONException;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.service.Regist
e
rable
;
import
chat.rocket.android.service.Registrable
;
import
chat.rocket.android_ddp.DDPSubscription
;
import
chat.rocket.android_ddp.DDPSubscription
;
import
rx.Subscription
;
import
rx.Subscription
;
public
abstract
class
AbstractDDPDocEventSubscriber
implements
Regist
e
rable
{
public
abstract
class
AbstractDDPDocEventSubscriber
implements
Registrable
{
protected
final
Context
context
;
protected
final
Context
context
;
protected
final
String
hostname
;
protected
final
String
hostname
;
protected
final
RealmHelper
realmHelper
;
protected
final
RealmHelper
realmHelper
;
protected
final
DDPClientWraper
ddpClient
;
protected
final
DDPClientWrap
p
er
ddpClient
;
private
boolean
isUnsubscribed
;
private
boolean
isUnsubscribed
;
private
String
subscriptionId
;
private
String
subscriptionId
;
private
Subscription
rxSubscription
;
private
Subscription
rxSubscription
;
protected
AbstractDDPDocEventSubscriber
(
Context
context
,
String
hostname
,
protected
AbstractDDPDocEventSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
hostname
=
hostname
;
this
.
hostname
=
hostname
;
this
.
realmHelper
=
realmHelper
;
this
.
realmHelper
=
realmHelper
;
...
...
app/src/main/java/chat/rocket/android/service/ddp/base/AbstractBaseSubscriber.java
View file @
7683da05
...
@@ -3,13 +3,13 @@ package chat.rocket.android.service.ddp.base;
...
@@ -3,13 +3,13 @@ package chat.rocket.android.service.ddp.base;
import
android.content.Context
;
import
android.content.Context
;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.service.ddp.AbstractDDPDocEventSubscriber
;
import
chat.rocket.android.service.ddp.AbstractDDPDocEventSubscriber
;
abstract
class
AbstractBaseSubscriber
extends
AbstractDDPDocEventSubscriber
{
abstract
class
AbstractBaseSubscriber
extends
AbstractDDPDocEventSubscriber
{
protected
AbstractBaseSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
protected
AbstractBaseSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/base/ActiveUsersSubscriber.java
View file @
7683da05
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
import
android.content.Context
;
import
android.content.Context
;
import
io.realm.RealmObject
;
import
io.realm.RealmObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
*/
*/
public
class
ActiveUsersSubscriber
extends
AbstractBaseSubscriber
{
public
class
ActiveUsersSubscriber
extends
AbstractBaseSubscriber
{
public
ActiveUsersSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
public
ActiveUsersSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/base/LoginServiceConfigurationSubscriber.java
View file @
7683da05
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
import
android.content.Context
;
import
android.content.Context
;
import
io.realm.RealmObject
;
import
io.realm.RealmObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.model.ddp.MeteorLoginServiceConfiguration
;
import
chat.rocket.android.model.ddp.MeteorLoginServiceConfiguration
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
*/
*/
public
class
LoginServiceConfigurationSubscriber
extends
AbstractBaseSubscriber
{
public
class
LoginServiceConfigurationSubscriber
extends
AbstractBaseSubscriber
{
public
LoginServiceConfigurationSubscriber
(
Context
context
,
String
hostname
,
public
LoginServiceConfigurationSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/base/UserDataSubscriber.java
View file @
7683da05
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
...
@@ -3,7 +3,7 @@ package chat.rocket.android.service.ddp.base;
import
android.content.Context
;
import
android.content.Context
;
import
io.realm.RealmObject
;
import
io.realm.RealmObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
...
@@ -12,7 +12,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
*/
*/
public
class
UserDataSubscriber
extends
AbstractBaseSubscriber
{
public
class
UserDataSubscriber
extends
AbstractBaseSubscriber
{
public
UserDataSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
public
UserDataSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/stream/AbstractStreamNotifyEventSubscriber.java
View file @
7683da05
...
@@ -5,7 +5,7 @@ import org.json.JSONArray;
...
@@ -5,7 +5,7 @@ import org.json.JSONArray;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
...
@@ -15,7 +15,7 @@ import chat.rocket.android_ddp.DDPSubscription;
...
@@ -15,7 +15,7 @@ import chat.rocket.android_ddp.DDPSubscription;
abstract
class
AbstractStreamNotifyEventSubscriber
extends
AbstractDDPDocEventSubscriber
{
abstract
class
AbstractStreamNotifyEventSubscriber
extends
AbstractDDPDocEventSubscriber
{
protected
AbstractStreamNotifyEventSubscriber
(
Context
context
,
String
hostname
,
protected
AbstractStreamNotifyEventSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/stream/AbstractStreamNotifyUserEventSubscriber.java
View file @
7683da05
...
@@ -2,7 +2,7 @@ package chat.rocket.android.service.ddp.stream;
...
@@ -2,7 +2,7 @@ package chat.rocket.android.service.ddp.stream;
import
android.content.Context
;
import
android.content.Context
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
abstract
class
AbstractStreamNotifyUserEventSubscriber
extends
AbstractStreamNotifyEventSubscriber
{
abstract
class
AbstractStreamNotifyUserEventSubscriber
extends
AbstractStreamNotifyEventSubscriber
{
...
@@ -10,7 +10,7 @@ abstract class AbstractStreamNotifyUserEventSubscriber extends AbstractStreamNot
...
@@ -10,7 +10,7 @@ abstract class AbstractStreamNotifyUserEventSubscriber extends AbstractStreamNot
protected
AbstractStreamNotifyUserEventSubscriber
(
Context
context
,
String
hostname
,
protected
AbstractStreamNotifyUserEventSubscriber
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
,
String
userId
)
{
DDPClientWrap
p
er
ddpClient
,
String
userId
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/stream/StreamNotifyUserSubscriptionsChanged.java
View file @
7683da05
...
@@ -5,13 +5,13 @@ import io.realm.RealmObject;
...
@@ -5,13 +5,13 @@ import io.realm.RealmObject;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
public
class
StreamNotifyUserSubscriptionsChanged
extends
AbstractStreamNotifyUserEventSubscriber
{
public
class
StreamNotifyUserSubscriptionsChanged
extends
AbstractStreamNotifyUserEventSubscriber
{
public
StreamNotifyUserSubscriptionsChanged
(
Context
context
,
String
hostname
,
public
StreamNotifyUserSubscriptionsChanged
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
,
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
,
String
userId
)
{
String
userId
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
,
userId
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
,
userId
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/ddp/stream/StreamRoomMessage.java
View file @
7683da05
...
@@ -5,7 +5,7 @@ import io.realm.RealmObject;
...
@@ -5,7 +5,7 @@ import io.realm.RealmObject;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.model.ddp.Message
;
import
chat.rocket.android.model.ddp.Message
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
...
@@ -16,7 +16,7 @@ public class StreamRoomMessage extends AbstractStreamNotifyEventSubscriber {
...
@@ -16,7 +16,7 @@ public class StreamRoomMessage extends AbstractStreamNotifyEventSubscriber {
private
String
roomId
;
private
String
roomId
;
public
StreamRoomMessage
(
Context
context
,
String
hostname
,
public
StreamRoomMessage
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
,
String
roomId
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
,
String
roomId
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
this
.
roomId
=
roomId
;
this
.
roomId
=
roomId
;
}
}
...
...
app/src/main/java/chat/rocket/android/service/internal/AbstractRocketChatCacheObserver.java
View file @
7683da05
...
@@ -7,9 +7,9 @@ import chat.rocket.android.RocketChatCache;
...
@@ -7,9 +7,9 @@ import chat.rocket.android.RocketChatCache;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.service.Regist
e
rable
;
import
chat.rocket.android.service.Registrable
;
public
abstract
class
AbstractRocketChatCacheObserver
implements
Regist
e
rable
{
public
abstract
class
AbstractRocketChatCacheObserver
implements
Registrable
{
private
final
Context
context
;
private
final
Context
context
;
private
final
RealmHelper
realmHelper
;
private
final
RealmHelper
realmHelper
;
private
String
roomId
;
private
String
roomId
;
...
...
app/src/main/java/chat/rocket/android/service/internal/StreamRoomMessageManager.java
View file @
7683da05
...
@@ -4,25 +4,25 @@ import android.content.Context;
...
@@ -4,25 +4,25 @@ import android.content.Context;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Looper
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.service.Regist
e
rable
;
import
chat.rocket.android.service.Registrable
;
import
chat.rocket.android.service.ddp.stream.StreamRoomMessage
;
import
chat.rocket.android.service.ddp.stream.StreamRoomMessage
;
/**
/**
* wrapper for managing stream-notify-message depending on RocketChatCache.
* wrapper for managing stream-notify-message depending on RocketChatCache.
*/
*/
public
class
StreamRoomMessageManager
implements
Regist
e
rable
{
public
class
StreamRoomMessageManager
implements
Registrable
{
private
final
Context
context
;
private
final
Context
context
;
private
final
String
hostname
;
private
final
String
hostname
;
private
final
RealmHelper
realmHelper
;
private
final
RealmHelper
realmHelper
;
private
final
DDPClientWraper
ddpClient
;
private
final
DDPClientWrap
p
er
ddpClient
;
private
final
AbstractRocketChatCacheObserver
cacheObserver
;
private
final
AbstractRocketChatCacheObserver
cacheObserver
;
private
final
Handler
handler
;
private
final
Handler
handler
;
private
StreamRoomMessage
streamRoomMessage
;
private
StreamRoomMessage
streamRoomMessage
;
public
StreamRoomMessageManager
(
Context
context
,
String
hostname
,
public
StreamRoomMessageManager
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
hostname
=
hostname
;
this
.
hostname
=
hostname
;
this
.
realmHelper
=
realmHelper
;
this
.
realmHelper
=
realmHelper
;
...
...
app/src/main/java/chat/rocket/android/service/observer/AbstractModelObserver.java
View file @
7683da05
...
@@ -3,22 +3,22 @@ package chat.rocket.android.service.observer;
...
@@ -3,22 +3,22 @@ package chat.rocket.android.service.observer;
import
android.content.Context
;
import
android.content.Context
;
import
io.realm.RealmObject
;
import
io.realm.RealmObject
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmListObserver
;
import
chat.rocket.android.realm_helper.RealmListObserver
;
import
chat.rocket.android.service.Regist
e
rable
;
import
chat.rocket.android.service.Registrable
;
abstract
class
AbstractModelObserver
<
T
extends
RealmObject
>
abstract
class
AbstractModelObserver
<
T
extends
RealmObject
>
implements
Regist
e
rable
,
RealmListObserver
.
Query
<
T
>,
RealmListObserver
.
OnUpdateListener
<
T
>
{
implements
Registrable
,
RealmListObserver
.
Query
<
T
>,
RealmListObserver
.
OnUpdateListener
<
T
>
{
protected
final
Context
context
;
protected
final
Context
context
;
protected
final
String
hostname
;
protected
final
String
hostname
;
protected
final
RealmHelper
realmHelper
;
protected
final
RealmHelper
realmHelper
;
protected
final
DDPClientWraper
ddpClient
;
protected
final
DDPClientWrap
p
er
ddpClient
;
private
final
RealmListObserver
observer
;
private
final
RealmListObserver
observer
;
protected
AbstractModelObserver
(
Context
context
,
String
hostname
,
protected
AbstractModelObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
hostname
=
hostname
;
this
.
hostname
=
hostname
;
this
.
realmHelper
=
realmHelper
;
this
.
realmHelper
=
realmHelper
;
...
...
app/src/main/java/chat/rocket/android/service/observer/CurrentUserObserver.java
View file @
7683da05
...
@@ -6,12 +6,12 @@ import io.realm.RealmResults;
...
@@ -6,12 +6,12 @@ import io.realm.RealmResults;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.model.ddp.User
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.realm_helper.RealmHelper
;
import
chat.rocket.android.service.Regist
e
rable
;
import
chat.rocket.android.service.Registrable
;
import
chat.rocket.android.service.ddp.stream.StreamNotifyUserSubscriptionsChanged
;
import
chat.rocket.android.service.ddp.stream.StreamNotifyUserSubscriptionsChanged
;
import
hugo.weaving.DebugLog
;
import
hugo.weaving.DebugLog
;
...
@@ -21,10 +21,10 @@ import hugo.weaving.DebugLog;
...
@@ -21,10 +21,10 @@ import hugo.weaving.DebugLog;
public
class
CurrentUserObserver
extends
AbstractModelObserver
<
User
>
{
public
class
CurrentUserObserver
extends
AbstractModelObserver
<
User
>
{
private
final
MethodCallHelper
methodCall
;
private
final
MethodCallHelper
methodCall
;
private
boolean
currentUserExists
;
private
boolean
currentUserExists
;
private
ArrayList
<
Regist
e
rable
>
listeners
;
private
ArrayList
<
Registrable
>
listeners
;
public
CurrentUserObserver
(
Context
context
,
String
hostname
,
public
CurrentUserObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
currentUserExists
=
false
;
currentUserExists
=
false
;
...
@@ -61,7 +61,7 @@ public class CurrentUserObserver extends AbstractModelObserver<User> {
...
@@ -61,7 +61,7 @@ public class CurrentUserObserver extends AbstractModelObserver<User> {
// get and observe Room subscriptions.
// get and observe Room subscriptions.
methodCall
.
getRoomSubscriptions
().
onSuccess
(
task
->
{
methodCall
.
getRoomSubscriptions
().
onSuccess
(
task
->
{
if
(
listeners
!=
null
)
{
if
(
listeners
!=
null
)
{
Regist
e
rable
listener
=
new
StreamNotifyUserSubscriptionsChanged
(
Registrable
listener
=
new
StreamNotifyUserSubscriptionsChanged
(
context
,
hostname
,
realmHelper
,
ddpClient
,
userId
);
context
,
hostname
,
realmHelper
,
ddpClient
,
userId
);
listener
.
register
();
listener
.
register
();
listeners
.
add
(
listener
);
listeners
.
add
(
listener
);
...
@@ -73,7 +73,7 @@ public class CurrentUserObserver extends AbstractModelObserver<User> {
...
@@ -73,7 +73,7 @@ public class CurrentUserObserver extends AbstractModelObserver<User> {
@DebugLog
@DebugLog
private
void
onLogout
()
{
private
void
onLogout
()
{
if
(
listeners
!=
null
)
{
if
(
listeners
!=
null
)
{
for
(
Regist
e
rable
listener
:
listeners
)
{
for
(
Registrable
listener
:
listeners
)
{
listener
.
unregister
();
listener
.
unregister
();
}
}
}
}
...
...
app/src/main/java/chat/rocket/android/service/observer/FileUploadingToS3Observer.java
View file @
7683da05
...
@@ -11,7 +11,7 @@ import java.io.IOException;
...
@@ -11,7 +11,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
bolts.Task
;
import
bolts.Task
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.FileUploadingHelper
;
import
chat.rocket.android.api.FileUploadingHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.OkHttpHelper
;
import
chat.rocket.android.helper.OkHttpHelper
;
...
@@ -35,7 +35,7 @@ public class FileUploadingToS3Observer extends AbstractModelObserver<FileUploadi
...
@@ -35,7 +35,7 @@ public class FileUploadingToS3Observer extends AbstractModelObserver<FileUploadi
private
FileUploadingHelper
methodCall
;
private
FileUploadingHelper
methodCall
;
public
FileUploadingToS3Observer
(
Context
context
,
String
hostname
,
public
FileUploadingToS3Observer
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
FileUploadingHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
FileUploadingHelper
(
realmHelper
,
ddpClient
);
...
...
app/src/main/java/chat/rocket/android/service/observer/FileUploadingWithUfsObserver.java
View file @
7683da05
...
@@ -9,7 +9,7 @@ import org.json.JSONObject;
...
@@ -9,7 +9,7 @@ import org.json.JSONObject;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
bolts.Task
;
import
bolts.Task
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.FileUploadingHelper
;
import
chat.rocket.android.api.FileUploadingHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.OkHttpHelper
;
import
chat.rocket.android.helper.OkHttpHelper
;
...
@@ -31,7 +31,7 @@ public class FileUploadingWithUfsObserver extends AbstractModelObserver<FileUplo
...
@@ -31,7 +31,7 @@ public class FileUploadingWithUfsObserver extends AbstractModelObserver<FileUplo
private
FileUploadingHelper
methodCall
;
private
FileUploadingHelper
methodCall
;
public
FileUploadingWithUfsObserver
(
Context
context
,
String
hostname
,
public
FileUploadingWithUfsObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
FileUploadingHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
FileUploadingHelper
(
realmHelper
,
ddpClient
);
...
...
app/src/main/java/chat/rocket/android/service/observer/GetUsersOfRoomsProcedureObserver.java
View file @
7683da05
...
@@ -7,7 +7,7 @@ import org.json.JSONObject;
...
@@ -7,7 +7,7 @@ import org.json.JSONObject;
import
java.util.List
;
import
java.util.List
;
import
bolts.Task
;
import
bolts.Task
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.model.SyncState
;
import
chat.rocket.android.model.SyncState
;
...
@@ -23,7 +23,7 @@ public class GetUsersOfRoomsProcedureObserver
...
@@ -23,7 +23,7 @@ public class GetUsersOfRoomsProcedureObserver
private
final
MethodCallHelper
methodCall
;
private
final
MethodCallHelper
methodCall
;
public
GetUsersOfRoomsProcedureObserver
(
Context
context
,
String
hostname
,
public
GetUsersOfRoomsProcedureObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/observer/LoadMessageProcedureObserver.java
View file @
7683da05
...
@@ -8,7 +8,7 @@ import org.json.JSONObject;
...
@@ -8,7 +8,7 @@ import org.json.JSONObject;
import
java.util.List
;
import
java.util.List
;
import
bolts.Task
;
import
bolts.Task
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.model.SyncState
;
import
chat.rocket.android.model.SyncState
;
...
@@ -24,7 +24,7 @@ public class LoadMessageProcedureObserver extends AbstractModelObserver<LoadMess
...
@@ -24,7 +24,7 @@ public class LoadMessageProcedureObserver extends AbstractModelObserver<LoadMess
private
final
MethodCallHelper
methodCall
;
private
final
MethodCallHelper
methodCall
;
public
LoadMessageProcedureObserver
(
Context
context
,
String
hostname
,
public
LoadMessageProcedureObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/observer/MethodCallObserver.java
View file @
7683da05
...
@@ -6,7 +6,7 @@ import io.realm.RealmResults;
...
@@ -6,7 +6,7 @@ import io.realm.RealmResults;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.CheckSum
;
import
chat.rocket.android.helper.CheckSum
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.model.SyncState
;
import
chat.rocket.android.model.SyncState
;
...
@@ -25,7 +25,7 @@ public class MethodCallObserver extends AbstractModelObserver<MethodCall> {
...
@@ -25,7 +25,7 @@ public class MethodCallObserver extends AbstractModelObserver<MethodCall> {
* constructor.
* constructor.
*/
*/
public
MethodCallObserver
(
Context
context
,
String
hostname
,
public
MethodCallObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
realmHelper
.
executeTransaction
(
realm
->
{
realmHelper
.
executeTransaction
(
realm
->
{
// resume pending operations.
// resume pending operations.
...
...
app/src/main/java/chat/rocket/android/service/observer/NewMessageObserver.java
View file @
7683da05
...
@@ -6,7 +6,7 @@ import io.realm.RealmResults;
...
@@ -6,7 +6,7 @@ import io.realm.RealmResults;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
...
@@ -22,7 +22,7 @@ public class NewMessageObserver extends AbstractModelObserver<Message> {
...
@@ -22,7 +22,7 @@ public class NewMessageObserver extends AbstractModelObserver<Message> {
private
final
MethodCallHelper
methodCall
;
private
final
MethodCallHelper
methodCall
;
public
NewMessageObserver
(
Context
context
,
String
hostname
,
public
NewMessageObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
...
...
app/src/main/java/chat/rocket/android/service/observer/NotificationItemObserver.java
View file @
7683da05
...
@@ -17,7 +17,7 @@ import java.util.List;
...
@@ -17,7 +17,7 @@ import java.util.List;
import
bolts.Task
;
import
bolts.Task
;
import
chat.rocket.android.R
;
import
chat.rocket.android.R
;
import
chat.rocket.android.activity.MainActivity
;
import
chat.rocket.android.activity.MainActivity
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.Avatar
;
import
chat.rocket.android.helper.Avatar
;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.helper.TextUtils
;
import
chat.rocket.android.model.ServerConfig
;
import
chat.rocket.android.model.ServerConfig
;
...
@@ -31,7 +31,7 @@ import chat.rocket.android.service.notification.NotificationDismissalCallbackSer
...
@@ -31,7 +31,7 @@ import chat.rocket.android.service.notification.NotificationDismissalCallbackSer
*/
*/
public
class
NotificationItemObserver
extends
AbstractModelObserver
<
NotificationItem
>
{
public
class
NotificationItemObserver
extends
AbstractModelObserver
<
NotificationItem
>
{
public
NotificationItemObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
public
NotificationItemObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/observer/ReactiveNotificationManager.java
View file @
7683da05
...
@@ -8,7 +8,7 @@ import org.json.JSONException;
...
@@ -8,7 +8,7 @@ import org.json.JSONException;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.log.RCLog
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
import
chat.rocket.android.model.ddp.RoomSubscription
;
...
@@ -20,7 +20,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
...
@@ -20,7 +20,7 @@ import chat.rocket.android.realm_helper.RealmHelper;
*/
*/
public
class
ReactiveNotificationManager
extends
AbstractModelObserver
<
RoomSubscription
>
{
public
class
ReactiveNotificationManager
extends
AbstractModelObserver
<
RoomSubscription
>
{
public
ReactiveNotificationManager
(
Context
context
,
String
hostname
,
public
ReactiveNotificationManager
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
}
}
...
...
app/src/main/java/chat/rocket/android/service/observer/SessionObserver.java
View file @
7683da05
...
@@ -5,7 +5,7 @@ import io.realm.Realm;
...
@@ -5,7 +5,7 @@ import io.realm.Realm;
import
io.realm.RealmResults
;
import
io.realm.RealmResults
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.model.ddp.PublicSetting
;
import
chat.rocket.android.model.ddp.PublicSetting
;
...
@@ -28,7 +28,7 @@ public class SessionObserver extends AbstractModelObserver<Session> {
...
@@ -28,7 +28,7 @@ public class SessionObserver extends AbstractModelObserver<Session> {
* constructor.
* constructor.
*/
*/
public
SessionObserver
(
Context
context
,
String
hostname
,
public
SessionObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
count
=
0
;
count
=
0
;
...
...
app/src/main/java/chat/rocket/android/service/observer/TokenLoginObserver.java
View file @
7683da05
...
@@ -5,7 +5,7 @@ import io.realm.Realm;
...
@@ -5,7 +5,7 @@ import io.realm.Realm;
import
io.realm.RealmResults
;
import
io.realm.RealmResults
;
import
java.util.List
;
import
java.util.List
;
import
chat.rocket.android.api.DDPClientWraper
;
import
chat.rocket.android.api.DDPClientWrap
p
er
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.api.MethodCallHelper
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.model.internal.Session
;
import
chat.rocket.android.model.internal.Session
;
...
@@ -16,7 +16,7 @@ public class TokenLoginObserver extends AbstractModelObserver<Session> {
...
@@ -16,7 +16,7 @@ public class TokenLoginObserver extends AbstractModelObserver<Session> {
private
final
MethodCallHelper
methodCall
;
private
final
MethodCallHelper
methodCall
;
public
TokenLoginObserver
(
Context
context
,
String
hostname
,
public
TokenLoginObserver
(
Context
context
,
String
hostname
,
RealmHelper
realmHelper
,
DDPClientWraper
ddpClient
)
{
RealmHelper
realmHelper
,
DDPClientWrap
p
er
ddpClient
)
{
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
super
(
context
,
hostname
,
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
methodCall
=
new
MethodCallHelper
(
realmHelper
,
ddpClient
);
}
}
...
...
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