fix proguard issue with NotificationTypeAdapter (#1129)

This commit is contained in:
Konrad Pozniak 2019-03-17 07:57:10 +01:00 committed by GitHub
commit cffb33d705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 19 deletions

View file

@ -1,18 +0,0 @@
package com.keylesspalace.tusky.json
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
import com.google.gson.JsonElement
import com.google.gson.JsonParseException
import com.keylesspalace.tusky.entity.Notification
import java.lang.reflect.Type
class NotificationTypeAdapter : JsonDeserializer<Notification.Type> {
@Throws(JsonParseException::class)
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Notification.Type {
return Notification.Type.byString(json.asString)
}
}