Format domain module

This commit is contained in:
moezbhatti
2019-04-10 22:12:57 -04:00
parent b64672c472
commit cc7f573e54
11 changed files with 73 additions and 34 deletions
@@ -51,4 +51,4 @@ sealed class Attachment {
}
class Attachments(attachments: List<Attachment>): List<Attachment> by attachments
class Attachments(attachments: List<Attachment>) : List<Attachment> by attachments
@@ -36,8 +36,7 @@ open class Conversation(
var me: Boolean = false,
var draft: String = "",
// For group chats, the user is allowed to set a custom title for the conversation
var name: String = ""
var name: String = "" // For group chats, the user is allowed to set a custom title for the conversation
) : RealmObject() {
fun getTitle(): String {
@@ -32,13 +32,15 @@ open class ScheduledMessage(
var attachments: RealmList<String> = RealmList()
) : RealmObject() {
fun copy(id: Long = this.id,
date: Long = this.date,
subId: Int = this.subId,
recipients: RealmList<String> = this.recipients,
sendAsGroup: Boolean = this.sendAsGroup,
body: String = this.body,
attachments: RealmList<String> = this.attachments): ScheduledMessage {
fun copy(
id: Long = this.id,
date: Long = this.date,
subId: Int = this.subId,
recipients: RealmList<String> = this.recipients,
sendAsGroup: Boolean = this.sendAsGroup,
body: String = this.body,
attachments: RealmList<String> = this.attachments
): ScheduledMessage {
return ScheduledMessage(id, date, subId, recipients, sendAsGroup, body, attachments)
}