chore(deps): bump com.google.devtools.ksp from 1.9.25-1.0.20 to 2.1.21-2.0.1 (#412)
* chore(deps): bump com.google.devtools.ksp Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from 1.9.25-1.0.20 to 2.1.21-2.0.1. - [Release notes](https://github.com/google/ksp/releases) - [Commits](https://github.com/google/ksp/compare/1.9.25-1.0.20...2.1.21-2.0.1) --- updated-dependencies: - dependency-name: com.google.devtools.ksp dependency-version: 2.1.21-2.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: make value nullable --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com>
This commit is contained in:
parent
95f017a4f3
commit
826545838a
2 changed files with 13 additions and 5 deletions
|
|
@ -14,20 +14,28 @@ class Converters {
|
||||||
private val messageAttachmentType = object : TypeToken<MessageAttachment?>() {}.type
|
private val messageAttachmentType = object : TypeToken<MessageAttachment?>() {}.type
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun jsonToAttachmentList(value: String) = gson.fromJson<ArrayList<Attachment>>(value, attachmentType)
|
fun jsonToAttachmentList(value: String?): ArrayList<Attachment>? {
|
||||||
|
return gson.fromJson<ArrayList<Attachment>>(value, attachmentType)
|
||||||
|
}
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun attachmentListToJson(list: ArrayList<Attachment>) = gson.toJson(list)
|
fun attachmentListToJson(list: ArrayList<Attachment>) = gson.toJson(list)
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun jsonToSimpleContactList(value: String) = gson.fromJson<ArrayList<SimpleContact>>(value, simpleContactType)
|
fun jsonToSimpleContactList(value: String?): ArrayList<SimpleContact>? {
|
||||||
|
return gson.fromJson<ArrayList<SimpleContact>>(value, simpleContactType)
|
||||||
|
}
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun simpleContactListToJson(list: ArrayList<SimpleContact>) = gson.toJson(list)
|
fun simpleContactListToJson(list: ArrayList<SimpleContact>) = gson.toJson(list)
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun jsonToMessageAttachment(value: String) = gson.fromJson<MessageAttachment>(value, messageAttachmentType)
|
fun jsonToMessageAttachment(value: String): MessageAttachment? {
|
||||||
|
return gson.fromJson<MessageAttachment>(value, messageAttachmentType)
|
||||||
|
}
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun messageAttachmentToJson(messageAttachment: MessageAttachment?) = gson.toJson(messageAttachment)
|
fun messageAttachmentToJson(messageAttachment: MessageAttachment?): String? {
|
||||||
|
return gson.toJson(messageAttachment)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
kotlin = "2.1.21"
|
kotlin = "2.1.21"
|
||||||
kotlinxSerializationJson = "1.8.1"
|
kotlinxSerializationJson = "1.8.1"
|
||||||
#KSP
|
#KSP
|
||||||
ksp = "1.9.25-1.0.20"
|
ksp = "2.1.21-2.0.1"
|
||||||
#Detekt
|
#Detekt
|
||||||
detekt = "1.23.8"
|
detekt = "1.23.8"
|
||||||
#AndroidX
|
#AndroidX
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue