test conversations loading
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.meloda.fast.api
|
||||
|
||||
import com.meloda.fast.api.loader.UsersLoader
|
||||
|
||||
object LoadManager {
|
||||
|
||||
val users = UsersLoader()
|
||||
|
||||
}
|
||||
@@ -24,9 +24,9 @@ object VKUtil {
|
||||
}
|
||||
|
||||
fun sortMessagesByDate(
|
||||
values: ArrayList<VKMessage>,
|
||||
values: ArrayList<oldVKMessage>,
|
||||
firstOnTop: Boolean
|
||||
): ArrayList<VKMessage> {
|
||||
): ArrayList<oldVKMessage> {
|
||||
values.sortWith { m1, m2 ->
|
||||
val d1 = m1.date
|
||||
val d2 = m2.date
|
||||
@@ -42,9 +42,9 @@ object VKUtil {
|
||||
}
|
||||
|
||||
fun sortConversationsByDate(
|
||||
values: ArrayList<VKConversation>,
|
||||
values: ArrayList<oldVKConversation>,
|
||||
firstOnTop: Boolean
|
||||
): ArrayList<VKConversation> {
|
||||
): ArrayList<oldVKConversation> {
|
||||
values.sortWith { c1, c2 ->
|
||||
val d1 = c1.lastMessage.date
|
||||
val d2 = c2.lastMessage.date
|
||||
@@ -119,8 +119,8 @@ object VKUtil {
|
||||
|
||||
|
||||
fun getTitle(
|
||||
conversation: VKConversation,
|
||||
peerUser: VKUser?,
|
||||
conversation: oldVKConversation,
|
||||
peerUser: oldVKUser?,
|
||||
peerGroup: VKGroup?
|
||||
): String {
|
||||
return when {
|
||||
@@ -137,8 +137,8 @@ object VKUtil {
|
||||
}
|
||||
|
||||
fun getMessageTitle(
|
||||
message: VKMessage,
|
||||
fromUser: VKUser?,
|
||||
message: oldVKMessage,
|
||||
fromUser: oldVKUser?,
|
||||
fromGroup: VKGroup?
|
||||
): String {
|
||||
return when {
|
||||
@@ -155,8 +155,8 @@ object VKUtil {
|
||||
}
|
||||
|
||||
fun getAvatar(
|
||||
conversation: VKConversation,
|
||||
peerUser: VKUser?,
|
||||
conversation: oldVKConversation,
|
||||
peerUser: oldVKUser?,
|
||||
peerGroup: VKGroup?
|
||||
): String {
|
||||
return when {
|
||||
@@ -177,8 +177,8 @@ object VKUtil {
|
||||
}
|
||||
|
||||
fun getUserAvatar(
|
||||
message: VKMessage,
|
||||
fromUser: VKUser?,
|
||||
message: oldVKMessage,
|
||||
fromUser: oldVKUser?,
|
||||
fromGroup: VKGroup?
|
||||
): String {
|
||||
return when {
|
||||
@@ -194,7 +194,7 @@ object VKUtil {
|
||||
}
|
||||
}
|
||||
|
||||
fun getUserPhoto(user: VKUser): String {
|
||||
fun getUserPhoto(user: oldVKUser): String {
|
||||
if (user.photo200.isEmpty()) {
|
||||
if (user.photo100.isEmpty()) {
|
||||
if (user.photo50.isEmpty()) {
|
||||
@@ -227,26 +227,26 @@ object VKUtil {
|
||||
}
|
||||
|
||||
|
||||
fun parseConversations(array: JSONArray): ArrayList<VKConversation> {
|
||||
val conversations = arrayListOf<VKConversation>()
|
||||
fun parseConversations(array: JSONArray): ArrayList<oldVKConversation> {
|
||||
val conversations = arrayListOf<oldVKConversation>()
|
||||
for (i in 0 until array.length()) {
|
||||
conversations.add(VKConversation(array.optJSONObject(i)))
|
||||
conversations.add(oldVKConversation(array.optJSONObject(i)))
|
||||
}
|
||||
|
||||
return conversations
|
||||
}
|
||||
|
||||
fun parseMessages(array: JSONArray): ArrayList<VKMessage> {
|
||||
val messages = arrayListOf<VKMessage>()
|
||||
fun parseMessages(array: JSONArray): ArrayList<oldVKMessage> {
|
||||
val messages = arrayListOf<oldVKMessage>()
|
||||
for (i in 0 until array.length()) {
|
||||
messages.add(VKMessage(array.optJSONObject(i)))
|
||||
messages.add(oldVKMessage(array.optJSONObject(i)))
|
||||
}
|
||||
|
||||
return messages
|
||||
}
|
||||
|
||||
fun isMessageHasFlag(mask: Int, flagName: String): Boolean {
|
||||
val o: Any? = VKMessage.flags[flagName]
|
||||
val o: Any? = oldVKMessage.flags[flagName]
|
||||
return if (o != null) { //has flag
|
||||
val flag = o as Int
|
||||
flag and mask > 0
|
||||
@@ -257,8 +257,8 @@ object VKUtil {
|
||||
//fromUser and fromGroup are null
|
||||
@Deprecated("need to rewrite")
|
||||
@WorkerThread
|
||||
fun parseLongPollMessage(array: JSONArray): VKMessage {
|
||||
val message = VKMessage()
|
||||
fun parseLongPollMessage(array: JSONArray): oldVKMessage {
|
||||
val message = oldVKMessage()
|
||||
|
||||
val id = array.optInt(1)
|
||||
val flags = array.optInt(2)
|
||||
@@ -302,7 +302,7 @@ object VKUtil {
|
||||
action.conversationMessageId = it.optInt("source_chat_local_id")
|
||||
|
||||
it.optJSONObject("source_message")?.let { message ->
|
||||
action.message = VKMessage(message)
|
||||
action.message = oldVKMessage(message)
|
||||
}
|
||||
}
|
||||
VKMessageAction.Type.UNPIN_MESSAGE -> {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.meloda.fast.api.loader
|
||||
|
||||
abstract class Loader<T> {
|
||||
|
||||
abstract suspend fun load(params: MutableMap<String, Any>): List<T>
|
||||
abstract suspend fun loadSingle(params: MutableMap<String, Any>): T
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.meloda.fast.api.loader
|
||||
|
||||
import com.meloda.fast.api.model.VkUser
|
||||
import com.meloda.fast.api.network.repo.UsersRepo
|
||||
import com.meloda.fast.api.network.request.UsersGetRequest
|
||||
import javax.inject.Inject
|
||||
|
||||
class UsersLoader : Loader<VkUser>() {
|
||||
|
||||
@Inject
|
||||
lateinit var repo: UsersRepo
|
||||
|
||||
suspend fun load(
|
||||
usersIds: List<Int>,
|
||||
fields: String = ""
|
||||
) = load(
|
||||
mutableMapOf(
|
||||
"usersIds" to usersIds.joinToString { it.toString() },
|
||||
"fields" to fields
|
||||
)
|
||||
)
|
||||
|
||||
override suspend fun load(params: MutableMap<String, Any>): List<VkUser> {
|
||||
val usersIds: String = params["usersIds"] as String
|
||||
val fields: String = params["fields"] as String
|
||||
|
||||
val users = repo.getById(
|
||||
UsersGetRequest(
|
||||
usersIds = usersIds.split(",").map { it.toInt() },
|
||||
fields = fields
|
||||
)
|
||||
)
|
||||
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
override suspend fun loadSingle(params: MutableMap<String, Any>): VkUser {
|
||||
return load(params)[0]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,9 +6,9 @@ class VKLongPollHistory : VKModel() {
|
||||
|
||||
override val attachmentType = VKAttachments.Type.NONE
|
||||
|
||||
private val lpMessages: ArrayList<VKMessage>? = null
|
||||
private val messages: ArrayList<VKMessage>? = null
|
||||
private val profiles: ArrayList<VKUser>? = null
|
||||
private val lpMessages: ArrayList<oldVKMessage>? = null
|
||||
private val messages: ArrayList<oldVKMessage>? = null
|
||||
private val profiles: ArrayList<oldVKUser>? = null
|
||||
private val groups: ArrayList<VKGroup>? = null //TODO: использовать
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ class VKMessageAction() : VKModel() {
|
||||
|
||||
var type: Type = Type.NONE
|
||||
var memberId = 0
|
||||
var message: VKMessage? = null
|
||||
var message: oldVKMessage? = null
|
||||
var conversationMessageId: Int = 0
|
||||
var text: String = ""
|
||||
var oldText: String = ""
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.meloda.fast.api.model
|
||||
|
||||
data class VkConversation(
|
||||
val id: Int,
|
||||
val title: String?,
|
||||
val lastMessage: VkMessage
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.meloda.fast.api.model
|
||||
|
||||
data class VkMessage(
|
||||
val id: Int,
|
||||
val text: String?,
|
||||
val isOut: Boolean,
|
||||
val peerId: Int,
|
||||
val fromId: Int,
|
||||
val date: Int
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.meloda.fast.api.model
|
||||
|
||||
data class VkUser(
|
||||
val id: Int,
|
||||
val firstName: String,
|
||||
val lastName: String
|
||||
)
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package com.meloda.fast.api.model
|
||||
package com.meloda.fast.api.model.base
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class BaseVKConversation(
|
||||
data class BaseVkConversation(
|
||||
val peer: Peer,
|
||||
@SerializedName("last_message_id")
|
||||
val lastMessageId: Int,
|
||||
@@ -29,7 +29,7 @@ data class BaseVKConversation(
|
||||
@SerializedName("can_receive_money")
|
||||
val canReceiveMoney: Boolean,
|
||||
@SerializedName("chat_settings")
|
||||
val chatSettings: ChatSettings
|
||||
val chatSettings: ChatSettings?
|
||||
) : Parcelable {
|
||||
|
||||
@Parcelize
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.meloda.fast.api.model
|
||||
package com.meloda.fast.api.model.base
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
@@ -6,7 +6,7 @@ import kotlinx.parcelize.Parcelize
|
||||
import kotlinx.parcelize.RawValue
|
||||
|
||||
@Parcelize
|
||||
data class BaseVKMessage(
|
||||
data class BaseVkMessage(
|
||||
val date: Int,
|
||||
@SerializedName("from_id")
|
||||
val fromId: Int,
|
||||
@@ -18,7 +18,7 @@ data class BaseVKMessage(
|
||||
@SerializedName("conversation_message_id")
|
||||
val conversationMessageId: Int,
|
||||
@SerializedName("fwd_messages")
|
||||
val fwdMessages: List<BaseVKMessage> = listOf(),
|
||||
val fwdMessages: List<BaseVkMessage> = listOf(),
|
||||
val important: Boolean,
|
||||
@SerializedName("random_id")
|
||||
val randomId: Int,
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.meloda.fast.api.model.base
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class BaseVkUser(
|
||||
val id: Int,
|
||||
@SerializedName("first_name")
|
||||
val firstName: String,
|
||||
@SerializedName("last_name")
|
||||
val lastName: String,
|
||||
@SerializedName("can_access_closed")
|
||||
val canAccessClosed: Boolean,
|
||||
@SerializedName("is_closed")
|
||||
val isClosed: Boolean,
|
||||
@SerializedName("can_invite_to_chats")
|
||||
val canInviteToChats: Boolean,
|
||||
val sex: Int?,
|
||||
@SerializedName("photo_50")
|
||||
val photo50: String?,
|
||||
@SerializedName("photo_100")
|
||||
val photo100: String?,
|
||||
@SerializedName("photo_200")
|
||||
val photo200: String?,
|
||||
val online: Int?,
|
||||
@SerializedName("online_info")
|
||||
val onlineInfo: OnlineInfo?,
|
||||
@SerializedName("screen_name")
|
||||
val screenName: String
|
||||
//...other fields
|
||||
) : Parcelable {
|
||||
|
||||
@Parcelize
|
||||
data class OnlineInfo(
|
||||
val visible: Boolean,
|
||||
val status: String,
|
||||
@SerializedName("last_seen")
|
||||
val lastSeen: Int?,
|
||||
@SerializedName("is_online")
|
||||
val isOnline: Boolean?,
|
||||
@SerializedName("online_mobile")
|
||||
val isOnlineMobile: Boolean?,
|
||||
@SerializedName("app_id")
|
||||
val appId: Int?
|
||||
) : Parcelable
|
||||
|
||||
}
|
||||
+7
-7
@@ -2,14 +2,14 @@ package com.meloda.fast.api.model
|
||||
|
||||
import org.json.JSONObject
|
||||
|
||||
class VKConversation() : VKModel(), Cloneable {
|
||||
class oldVKConversation() : VKModel(), Cloneable {
|
||||
|
||||
override val attachmentType = VKAttachments.Type.NONE
|
||||
|
||||
companion object {
|
||||
const val serialVersionUID: Long = 1L
|
||||
|
||||
var profiles = arrayListOf<VKUser>()
|
||||
var profiles = arrayListOf<oldVKUser>()
|
||||
var groups = arrayListOf<VKGroup>()
|
||||
|
||||
var conversationsCount: Int = 0
|
||||
@@ -41,12 +41,12 @@ class VKConversation() : VKModel(), Cloneable {
|
||||
var membersCount: Int = 0
|
||||
var title: String? = null
|
||||
|
||||
var pinnedMessage: VKMessage? = null
|
||||
var pinnedMessage: oldVKMessage? = null
|
||||
|
||||
var intState: Int = 0
|
||||
var state: State = State.IN
|
||||
|
||||
var lastMessage: VKMessage = VKMessage()
|
||||
var lastMessage: oldVKMessage = oldVKMessage()
|
||||
|
||||
var isGroupChannel: Boolean = false
|
||||
|
||||
@@ -54,7 +54,7 @@ class VKConversation() : VKModel(), Cloneable {
|
||||
var photo100: String = ""
|
||||
var photo200: String = ""
|
||||
|
||||
var peerUser: VKUser? = null
|
||||
var peerUser: oldVKUser? = null
|
||||
|
||||
var peerGroup: VKGroup? = null
|
||||
|
||||
@@ -87,7 +87,7 @@ class VKConversation() : VKModel(), Cloneable {
|
||||
if (title?.isBlank() == true) title = null
|
||||
|
||||
it.optJSONObject("pinned_message")?.let { pinned ->
|
||||
pinnedMessage = VKMessage(pinned)
|
||||
pinnedMessage = oldVKMessage(pinned)
|
||||
}
|
||||
|
||||
state = State.fromString(it.optString("state"))
|
||||
@@ -112,7 +112,7 @@ class VKConversation() : VKModel(), Cloneable {
|
||||
|
||||
override fun toString() = title ?: ""
|
||||
|
||||
public override fun clone() = super.clone() as VKConversation
|
||||
public override fun clone() = super.clone() as oldVKConversation
|
||||
|
||||
enum class Type(val value: String) {
|
||||
NULL("null"),
|
||||
+10
-10
@@ -4,15 +4,15 @@ import android.util.ArrayMap
|
||||
import com.meloda.fast.api.VKUtil
|
||||
import org.json.JSONObject
|
||||
|
||||
open class VKMessage() : VKModel() {
|
||||
open class oldVKMessage() : VKModel() {
|
||||
|
||||
override val attachmentType = VKAttachments.Type.NONE
|
||||
|
||||
companion object {
|
||||
|
||||
var profiles = arrayListOf<VKUser>()
|
||||
var profiles = arrayListOf<oldVKUser>()
|
||||
var groups = arrayListOf<VKGroup>()
|
||||
var conversations = arrayListOf<VKConversation>()
|
||||
var conversations = arrayListOf<oldVKConversation>()
|
||||
|
||||
const val serialVersionUID: Long = 1L
|
||||
|
||||
@@ -97,13 +97,13 @@ open class VKMessage() : VKModel() {
|
||||
|
||||
var attachments: ArrayList<VKModel> = arrayListOf()
|
||||
|
||||
var fwdMessages: ArrayList<VKMessage> = arrayListOf()
|
||||
var fwdMessages: ArrayList<oldVKMessage> = arrayListOf()
|
||||
|
||||
var replyMessage: VKMessage? = null
|
||||
var replyMessage: oldVKMessage? = null
|
||||
|
||||
var action: VKMessageAction? = null
|
||||
|
||||
var fromUser: VKUser? = null
|
||||
var fromUser: oldVKUser? = null
|
||||
|
||||
var fromGroup: VKGroup? = null
|
||||
|
||||
@@ -126,15 +126,15 @@ open class VKMessage() : VKModel() {
|
||||
}
|
||||
|
||||
o.optJSONArray("fwd_messages")?.let {
|
||||
val fwdMessages = ArrayList<VKMessage>(it.length())
|
||||
val fwdMessages = ArrayList<oldVKMessage>(it.length())
|
||||
for (i in 0 until it.length()) {
|
||||
fwdMessages.add(VKMessage(it.optJSONObject(i)))
|
||||
fwdMessages.add(oldVKMessage(it.optJSONObject(i)))
|
||||
}
|
||||
this.fwdMessages = fwdMessages
|
||||
}
|
||||
|
||||
o.optJSONObject("reply_message")?.let {
|
||||
replyMessage = VKMessage(it)
|
||||
replyMessage = oldVKMessage(it)
|
||||
}
|
||||
|
||||
o.optJSONObject("action")?.let {
|
||||
@@ -142,7 +142,7 @@ open class VKMessage() : VKModel() {
|
||||
}
|
||||
}
|
||||
|
||||
fun getForwardedMessages() = ArrayList<VKMessage>().apply {
|
||||
fun getForwardedMessages() = ArrayList<oldVKMessage>().apply {
|
||||
for (model in fwdMessages) add(model)
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@ package com.meloda.fast.api.model
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
|
||||
open class VKUser() : VKModel() {
|
||||
open class oldVKUser() : VKModel() {
|
||||
|
||||
override val attachmentType = VKAttachments.Type.NONE
|
||||
|
||||
@@ -12,11 +12,11 @@ open class VKUser() : VKModel() {
|
||||
|
||||
var friendsCount: Int = 0
|
||||
|
||||
fun parse(array: JSONArray): ArrayList<VKUser> {
|
||||
val users = ArrayList<VKUser>()
|
||||
fun parse(array: JSONArray): ArrayList<oldVKUser> {
|
||||
val users = ArrayList<oldVKUser>()
|
||||
|
||||
for (i in 0 until array.length()) {
|
||||
users.add(VKUser(array.optJSONObject(i)))
|
||||
users.add(oldVKUser(array.optJSONObject(i)))
|
||||
}
|
||||
|
||||
return users
|
||||
@@ -2,10 +2,9 @@ package com.meloda.fast.api.network
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.meloda.fast.api.network.datasource.AuthDataSource
|
||||
import com.meloda.fast.api.network.datasource.ConversationsDataSource
|
||||
import com.meloda.fast.api.network.repo.AuthRepo
|
||||
import com.meloda.fast.api.network.repo.ConversationsRepo
|
||||
import com.meloda.fast.api.network.repo.UsersRepo
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
@@ -60,16 +59,12 @@ class VKModules {
|
||||
fun provideAuthRepo(retrofit: Retrofit): AuthRepo =
|
||||
retrofit.create(AuthRepo::class.java)
|
||||
|
||||
@Provides
|
||||
fun provideAuthDataSource(repo: AuthRepo): AuthDataSource =
|
||||
AuthDataSource(repo)
|
||||
|
||||
@Provides
|
||||
fun provideConversationsRepo(retrofit: Retrofit): ConversationsRepo =
|
||||
retrofit.create(ConversationsRepo::class.java)
|
||||
|
||||
@Provides
|
||||
fun provideConversationsDataSource(repo: ConversationsRepo): ConversationsDataSource =
|
||||
ConversationsDataSource(repo)
|
||||
fun provideUsersRepo(retrofit: Retrofit): UsersRepo =
|
||||
retrofit.create(UsersRepo::class.java)
|
||||
|
||||
}
|
||||
@@ -14,6 +14,10 @@ object VKUrls {
|
||||
const val get = "$API/messages.getConversations"
|
||||
}
|
||||
|
||||
object Users {
|
||||
const val getById = "$API/users.get"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.meloda.fast.api.network.datasource
|
||||
|
||||
import com.meloda.fast.api.network.repo.AuthRepo
|
||||
import javax.inject.Inject
|
||||
|
||||
class AuthDataSource @Inject constructor(
|
||||
private val repo: AuthRepo
|
||||
) : AuthRepo {
|
||||
override suspend fun auth(param: Map<String, String?>) = repo.auth(param)
|
||||
|
||||
override suspend fun sendSms(validationSid: String) = repo.sendSms(validationSid)
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.meloda.fast.api.network.datasource
|
||||
|
||||
import com.meloda.fast.api.network.repo.ConversationsRepo
|
||||
import com.meloda.fast.api.network.request.ConversationsGetRequest
|
||||
import javax.inject.Inject
|
||||
|
||||
class ConversationsDataSource @Inject constructor(
|
||||
private val repo: ConversationsRepo
|
||||
) : ConversationsRepo {
|
||||
|
||||
override suspend fun getAllChats(param: ConversationsGetRequest) = repo.getAllChats(param)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.meloda.fast.api.network.repo
|
||||
|
||||
import com.meloda.fast.api.base.ApiResponse
|
||||
import com.meloda.fast.api.model.base.BaseVkUser
|
||||
import com.meloda.fast.api.network.Answer
|
||||
import com.meloda.fast.api.network.VKUrls
|
||||
import com.meloda.fast.api.network.request.UsersGetRequest
|
||||
import dagger.Component
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface UsersRepo {
|
||||
|
||||
@POST(VKUrls.Users.getById)
|
||||
suspend fun getById(@Body param: UsersGetRequest): Answer<ApiResponse<List<BaseVkUser>>>
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.meloda.fast.api.network.request
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class UsersGetRequest(
|
||||
@SerializedName("user_ids")
|
||||
val usersIds: List<Int>,
|
||||
val fields: String? = null,
|
||||
@SerializedName("nom_case")
|
||||
val nomCase: String? = null
|
||||
) : Parcelable
|
||||
@@ -2,8 +2,8 @@ package com.meloda.fast.api.network.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.meloda.fast.api.model.BaseVKConversation
|
||||
import com.meloda.fast.api.model.BaseVKMessage
|
||||
import com.meloda.fast.api.model.base.BaseVkConversation
|
||||
import com.meloda.fast.api.model.base.BaseVkMessage
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
@@ -16,7 +16,7 @@ data class ConversationsGetResponse(
|
||||
|
||||
@Parcelize
|
||||
data class ConversationsResponseItems(
|
||||
val conversation: BaseVKConversation,
|
||||
val conversation: BaseVkConversation,
|
||||
@SerializedName("last_message")
|
||||
val lastMessage: BaseVKMessage
|
||||
val lastMessage: BaseVkMessage
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.meloda.fast.api.network.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
Reference in New Issue
Block a user