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
2c96aa60
Commit
2c96aa60
authored
May 27, 2017
by
Matheus Jardim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missing data to realMessage
parent
b575b920
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
RealmMessageRepository.java
...ersistence/realm/repositories/RealmMessageRepository.java
+7
-3
No files found.
persistence-realm/src/main/java/chat/rocket/persistence/realm/repositories/RealmMessageRepository.java
View file @
2c96aa60
...
...
@@ -2,7 +2,9 @@ package chat.rocket.persistence.realm.repositories;
import
android.os.Looper
;
import
android.support.v4.util.Pair
;
import
com.fernandocejas.arrow.optional.Optional
;
import
io.reactivex.Flowable
;
import
io.reactivex.Single
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
...
...
@@ -12,6 +14,7 @@ import io.realm.Sort;
import
java.util.ArrayList
;
import
java.util.List
;
import
chat.rocket.core.models.Message
;
import
chat.rocket.core.models.Room
;
import
chat.rocket.core.models.User
;
...
...
@@ -75,10 +78,11 @@ public class RealmMessageRepository extends RealmRepository implements MessageRe
RealmUser
realmUser
=
realmMessage
.
getUser
();
if
(
realmUser
==
null
)
{
realmUser
=
new
RealmUser
();
realmUser
=
realm
.
where
(
RealmUser
.
class
)
.
equalTo
(
RealmUser
.
ID
,
message
.
getUser
().
getId
())
.
findFirst
();
}
realmUser
.
setId
(
message
.
getUser
().
getId
());
realmMessage
.
setUser
(
realmUser
);
realm
.
beginTransaction
();
...
...
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