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
e6e14693
Commit
e6e14693
authored
Feb 17, 2017
by
Tiago Cunha
Committed by
GitHub
Feb 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/untengle-modules
parents
9ac83d10
7c3b692d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
RealmPreferences.java
...rocket/persistence/realm/models/ddp/RealmPreferences.java
+5
-4
Preferences.java
...re/src/main/java/chat/rocket/core/models/Preferences.java
+5
-2
No files found.
persistence-realm/src/main/java/chat/rocket/persistence/realm/models/ddp/RealmPreferences.java
View file @
e6e14693
...
@@ -10,7 +10,7 @@ public class RealmPreferences extends RealmObject {
...
@@ -10,7 +10,7 @@ public class RealmPreferences extends RealmObject {
@PrimaryKey
private
String
id
;
@PrimaryKey
private
String
id
;
private
boolean
newRoomNotification
;
private
String
newRoomNotification
;
private
boolean
newMessageNotification
;
private
boolean
newMessageNotification
;
private
boolean
useEmojis
;
private
boolean
useEmojis
;
private
boolean
convertAsciiEmoji
;
private
boolean
convertAsciiEmoji
;
...
@@ -48,7 +48,7 @@ public class RealmPreferences extends RealmObject {
...
@@ -48,7 +48,7 @@ public class RealmPreferences extends RealmObject {
.
build
();
.
build
();
}
}
public
boolean
is
NewRoomNotification
()
{
public
String
get
NewRoomNotification
()
{
return
newRoomNotification
;
return
newRoomNotification
;
}
}
...
@@ -119,7 +119,8 @@ public class RealmPreferences extends RealmObject {
...
@@ -119,7 +119,8 @@ public class RealmPreferences extends RealmObject {
RealmPreferences
that
=
(
RealmPreferences
)
o
;
RealmPreferences
that
=
(
RealmPreferences
)
o
;
if
(
newRoomNotification
!=
that
.
newRoomNotification
)
{
if
(
newRoomNotification
!=
null
?
newRoomNotification
.
equals
(
that
.
newRoomNotification
)
:
that
.
newRoomNotification
==
null
)
{
return
false
;
return
false
;
}
}
if
(
newMessageNotification
!=
that
.
newMessageNotification
)
{
if
(
newMessageNotification
!=
that
.
newMessageNotification
)
{
...
@@ -172,7 +173,7 @@ public class RealmPreferences extends RealmObject {
...
@@ -172,7 +173,7 @@ public class RealmPreferences extends RealmObject {
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
result
=
id
!=
null
?
id
.
hashCode
()
:
0
;
int
result
=
id
!=
null
?
id
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
newRoomNotification
?
1
:
0
);
result
=
31
*
result
+
(
newRoomNotification
!=
null
?
newRoomNotification
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
newMessageNotification
?
1
:
0
);
result
=
31
*
result
+
(
newMessageNotification
?
1
:
0
);
result
=
31
*
result
+
(
useEmojis
?
1
:
0
);
result
=
31
*
result
+
(
useEmojis
?
1
:
0
);
result
=
31
*
result
+
(
convertAsciiEmoji
?
1
:
0
);
result
=
31
*
result
+
(
convertAsciiEmoji
?
1
:
0
);
...
...
rocket-chat-core/src/main/java/chat/rocket/core/models/Preferences.java
View file @
e6e14693
...
@@ -2,12 +2,15 @@ package chat.rocket.core.models;
...
@@ -2,12 +2,15 @@ package chat.rocket.core.models;
import
com.google.auto.value.AutoValue
;
import
com.google.auto.value.AutoValue
;
import
javax.annotation.Nullable
;
@AutoValue
@AutoValue
public
abstract
class
Preferences
{
public
abstract
class
Preferences
{
public
abstract
String
getId
();
public
abstract
String
getId
();
public
abstract
boolean
isNewRoomNotification
();
@Nullable
public
abstract
String
getNewRoomNotification
();
public
abstract
boolean
isNewMessageNotification
();
public
abstract
boolean
isNewMessageNotification
();
...
@@ -46,7 +49,7 @@ public abstract class Preferences {
...
@@ -46,7 +49,7 @@ public abstract class Preferences {
public
abstract
Builder
setId
(
String
id
);
public
abstract
Builder
setId
(
String
id
);
public
abstract
Builder
setNewRoomNotification
(
boolean
newRoomNotification
);
public
abstract
Builder
setNewRoomNotification
(
String
newRoomNotification
);
public
abstract
Builder
setNewMessageNotification
(
boolean
newMessageNotification
);
public
abstract
Builder
setNewMessageNotification
(
boolean
newMessageNotification
);
...
...
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