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
ffd30513
Commit
ffd30513
authored
Nov 11, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truncate RoomSubscription on login.
parent
9e92d9a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
SessionObserver.java
...chat/rocket/android/service/observer/SessionObserver.java
+6
-1
No files found.
app/src/main/java/chat/rocket/android/service/observer/SessionObserver.java
View file @
ffd30513
...
...
@@ -3,12 +3,14 @@ package chat.rocket.android.service.observer;
import
android.content.Context
;
import
chat.rocket.android.helper.LogcatIfError
;
import
chat.rocket.android.helper.MethodCallHelper
;
import
chat.rocket.android.model.RoomSubscription
;
import
chat.rocket.android.model.ServerConfig
;
import
chat.rocket.android.ws.RocketChatWebSocketAPI
;
import
hugo.weaving.DebugLog
;
import
io.realm.Realm
;
import
io.realm.RealmResults
;
import
java.util.List
;
import
jp.co.crowdworks.realm_java_helpers_bolts.RealmHelperBolts
;
/**
* Observes user is logged into server.
...
...
@@ -53,7 +55,10 @@ public class SessionObserver extends AbstractModelObserver<ServerConfig> {
@DebugLog
private
void
onLogin
()
{
final
MethodCallHelper
methodCallHelper
=
new
MethodCallHelper
(
serverConfigId
);
methodCallHelper
.
getRooms
()
RealmHelperBolts
.
executeTransaction
(
realm
->
{
realm
.
delete
(
RoomSubscription
.
class
);
return
null
;
}).
onSuccessTask
(
_task
->
methodCallHelper
.
getRooms
())
.
continueWith
(
new
LogcatIfError
());
}
...
...
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