Commit b022e68b authored by Yusuke Iwaki's avatar Yusuke Iwaki

remove MessageUrl model.

parent 0882622c
package chat.rocket.android.model.ddp; package chat.rocket.android.model.ddp;
import chat.rocket.android.model.SyncState; import chat.rocket.android.model.SyncState;
import io.realm.RealmList;
import io.realm.RealmObject; import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey; import io.realm.annotations.PrimaryKey;
import org.json.JSONException; import org.json.JSONException;
...@@ -24,7 +23,7 @@ public class Message extends RealmObject { ...@@ -24,7 +23,7 @@ public class Message extends RealmObject {
private User u; private User u;
private boolean groupable; private boolean groupable;
private String attachments; //JSONArray. private String attachments; //JSONArray.
private RealmList<MessageUrl> urls; private String urls; //JSONArray.
public String get_id() { public String get_id() {
return _id; return _id;
...@@ -98,11 +97,11 @@ public class Message extends RealmObject { ...@@ -98,11 +97,11 @@ public class Message extends RealmObject {
this.attachments = attachments; this.attachments = attachments;
} }
public RealmList<MessageUrl> getUrls() { public String getUrls() {
return urls; return urls;
} }
public void setUrls(RealmList<MessageUrl> urls) { public void setUrls(String urls) {
this.urls = urls; this.urls = urls;
} }
......
package chat.rocket.android.model.ddp;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
/**
* Url.
*/
@SuppressWarnings({"PMD.ShortClassName", "PMD.ShortVariable",
"PMD.MethodNamingConventions", "PMD.VariableNamingConventions"})
public class MessageUrl extends RealmObject {
@PrimaryKey private String url;
private String parsedUrl;
}
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