Commit ed40f42f authored by Tiago Cunha's avatar Tiago Cunha

New message notification is a Srting too

parent 54632d59
......@@ -11,7 +11,7 @@ public class RealmPreferences extends RealmObject {
@PrimaryKey private String id;
private String newRoomNotification;
private boolean newMessageNotification;
private String newMessageNotification;
private boolean useEmojis;
private boolean convertAsciiEmoji;
private boolean saveMobileBandwidth;
......@@ -52,7 +52,7 @@ public class RealmPreferences extends RealmObject {
return newRoomNotification;
}
public boolean isNewMessageNotification() {
public String getNewMessageNotification() {
return newMessageNotification;
}
......@@ -123,7 +123,8 @@ public class RealmPreferences extends RealmObject {
: that.newRoomNotification == null) {
return false;
}
if (newMessageNotification != that.newMessageNotification) {
if (newMessageNotification != null ? newMessageNotification.equals(that.newMessageNotification)
: that.newMessageNotification == null) {
return false;
}
if (useEmojis != that.useEmojis) {
......@@ -174,7 +175,7 @@ public class RealmPreferences extends RealmObject {
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (newRoomNotification != null ? newRoomNotification.hashCode() : 0);
result = 31 * result + (newMessageNotification ? 1 : 0);
result = 31 * result + (newMessageNotification != null ? newMessageNotification.hashCode() : 0);
result = 31 * result + (useEmojis ? 1 : 0);
result = 31 * result + (convertAsciiEmoji ? 1 : 0);
result = 31 * result + (saveMobileBandwidth ? 1 : 0);
......
......@@ -12,7 +12,8 @@ public abstract class Preferences {
@Nullable
public abstract String getNewRoomNotification();
public abstract boolean isNewMessageNotification();
@Nullable
public abstract String getNewMessageNotification();
public abstract boolean isUseEmojis();
......@@ -51,7 +52,7 @@ public abstract class Preferences {
public abstract Builder setNewRoomNotification(String newRoomNotification);
public abstract Builder setNewMessageNotification(boolean newMessageNotification);
public abstract Builder setNewMessageNotification(String newMessageNotification);
public abstract Builder setUseEmojis(boolean useEmojis);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment