core: add remote host ID to entities
This commit is contained in:
parent
5bbf4d70a1
commit
53a31ec60e
@ -579,6 +579,7 @@ fun PreviewActiveCallOverlayVideo() {
|
|||||||
SimpleXTheme {
|
SimpleXTheme {
|
||||||
ActiveCallOverlayLayout(
|
ActiveCallOverlayLayout(
|
||||||
call = Call(
|
call = Call(
|
||||||
|
remoteHostId = null,
|
||||||
contact = Contact.sampleData,
|
contact = Contact.sampleData,
|
||||||
callState = CallState.Negotiated,
|
callState = CallState.Negotiated,
|
||||||
localMedia = CallMediaType.Video,
|
localMedia = CallMediaType.Video,
|
||||||
@ -604,6 +605,7 @@ fun PreviewActiveCallOverlayAudio() {
|
|||||||
SimpleXTheme {
|
SimpleXTheme {
|
||||||
ActiveCallOverlayLayout(
|
ActiveCallOverlayLayout(
|
||||||
call = Call(
|
call = Call(
|
||||||
|
remoteHostId = null,
|
||||||
contact = Contact.sampleData,
|
contact = Contact.sampleData,
|
||||||
callState = CallState.Negotiated,
|
callState = CallState.Negotiated,
|
||||||
localMedia = CallMediaType.Audio,
|
localMedia = CallMediaType.Audio,
|
||||||
|
@ -616,7 +616,7 @@ enum class ChatType(val type: String) {
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class User(
|
data class User(
|
||||||
val remoteHostId: Long? = null,
|
val remoteHostId: Long?,
|
||||||
override val userId: Long,
|
override val userId: Long,
|
||||||
val userContactId: Long,
|
val userContactId: Long,
|
||||||
val localDisplayName: String,
|
val localDisplayName: String,
|
||||||
@ -639,6 +639,7 @@ data class User(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val sampleData = User(
|
val sampleData = User(
|
||||||
|
remoteHostId = null,
|
||||||
userId = 1,
|
userId = 1,
|
||||||
userContactId = 1,
|
userContactId = 1,
|
||||||
localDisplayName = "alice",
|
localDisplayName = "alice",
|
||||||
@ -715,8 +716,8 @@ interface SomeChat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Serializable @Stable
|
@Serializable @Stable
|
||||||
data class Chat (
|
data class Chat(
|
||||||
val remoteHostId: Long? = null,
|
val remoteHostId: Long?,
|
||||||
val chatInfo: ChatInfo,
|
val chatInfo: ChatInfo,
|
||||||
val chatItems: List<ChatItem>,
|
val chatItems: List<ChatItem>,
|
||||||
val chatStats: ChatStats = ChatStats()
|
val chatStats: ChatStats = ChatStats()
|
||||||
@ -749,6 +750,7 @@ data class Chat (
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val sampleData = Chat(
|
val sampleData = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Direct.sampleData,
|
chatInfo = ChatInfo.Direct.sampleData,
|
||||||
chatItems = arrayListOf(ChatItem.getSampleData())
|
chatItems = arrayListOf(ChatItem.getSampleData())
|
||||||
)
|
)
|
||||||
|
@ -106,6 +106,7 @@ fun PreviewIncomingCallAlertLayout() {
|
|||||||
SimpleXTheme {
|
SimpleXTheme {
|
||||||
IncomingCallAlertLayout(
|
IncomingCallAlertLayout(
|
||||||
invitation = RcvCallInvitation(
|
invitation = RcvCallInvitation(
|
||||||
|
remoteHostId = null,
|
||||||
user = User.sampleData,
|
user = User.sampleData,
|
||||||
contact = Contact.sampleData,
|
contact = Contact.sampleData,
|
||||||
callType = CallType(media = CallMediaType.Audio, capabilities = CallCapabilities(encryption = false)),
|
callType = CallType(media = CallMediaType.Audio, capabilities = CallCapabilities(encryption = false)),
|
||||||
|
@ -11,7 +11,7 @@ import java.util.*
|
|||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
data class Call(
|
data class Call(
|
||||||
val remoteHostId: Long? = null,
|
val remoteHostId: Long?,
|
||||||
val contact: Contact,
|
val contact: Contact,
|
||||||
val callState: CallState,
|
val callState: CallState,
|
||||||
val localMedia: CallMediaType,
|
val localMedia: CallMediaType,
|
||||||
@ -97,7 +97,7 @@ sealed class WCallResponse {
|
|||||||
@Serializable data class WebRTCExtraInfo(val rtcIceCandidates: String)
|
@Serializable data class WebRTCExtraInfo(val rtcIceCandidates: String)
|
||||||
@Serializable data class CallType(val media: CallMediaType, val capabilities: CallCapabilities)
|
@Serializable data class CallType(val media: CallMediaType, val capabilities: CallCapabilities)
|
||||||
@Serializable data class RcvCallInvitation(
|
@Serializable data class RcvCallInvitation(
|
||||||
val remoteHostId: Long? = null,
|
val remoteHostId: Long?,
|
||||||
val user: User,
|
val user: User,
|
||||||
val contact: Contact,
|
val contact: Contact,
|
||||||
val callType: CallType,
|
val callType: CallType,
|
||||||
|
@ -718,6 +718,7 @@ fun PreviewChatInfoLayout() {
|
|||||||
SimpleXTheme {
|
SimpleXTheme {
|
||||||
ChatInfoLayout(
|
ChatInfoLayout(
|
||||||
chat = Chat(
|
chat = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Direct.sampleData,
|
chatInfo = ChatInfo.Direct.sampleData,
|
||||||
chatItems = arrayListOf()
|
chatItems = arrayListOf()
|
||||||
),
|
),
|
||||||
|
@ -1418,6 +1418,7 @@ fun PreviewChatLayout() {
|
|||||||
val searchValue = remember { mutableStateOf("") }
|
val searchValue = remember { mutableStateOf("") }
|
||||||
ChatLayout(
|
ChatLayout(
|
||||||
chat = Chat(
|
chat = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Direct.sampleData,
|
chatInfo = ChatInfo.Direct.sampleData,
|
||||||
chatItems = chatItems,
|
chatItems = chatItems,
|
||||||
chatStats = Chat.ChatStats()
|
chatStats = Chat.ChatStats()
|
||||||
@ -1490,6 +1491,7 @@ fun PreviewGroupChatLayout() {
|
|||||||
val searchValue = remember { mutableStateOf("") }
|
val searchValue = remember { mutableStateOf("") }
|
||||||
ChatLayout(
|
ChatLayout(
|
||||||
chat = Chat(
|
chat = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Group.sampleData,
|
chatInfo = ChatInfo.Group.sampleData,
|
||||||
chatItems = chatItems,
|
chatItems = chatItems,
|
||||||
chatStats = Chat.ChatStats()
|
chatStats = Chat.ChatStats()
|
||||||
|
@ -524,6 +524,7 @@ fun PreviewGroupChatInfoLayout() {
|
|||||||
SimpleXTheme {
|
SimpleXTheme {
|
||||||
GroupChatInfoLayout(
|
GroupChatInfoLayout(
|
||||||
chat = Chat(
|
chat = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Direct.sampleData,
|
chatInfo = ChatInfo.Direct.sampleData,
|
||||||
chatItems = arrayListOf()
|
chatItems = arrayListOf()
|
||||||
),
|
),
|
||||||
|
@ -772,6 +772,7 @@ fun PreviewChatListNavLinkDirect() {
|
|||||||
chatLinkPreview = {
|
chatLinkPreview = {
|
||||||
ChatPreviewView(
|
ChatPreviewView(
|
||||||
chat = Chat(
|
chat = Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Direct.sampleData,
|
chatInfo = ChatInfo.Direct.sampleData,
|
||||||
chatItems = listOf(
|
chatItems = listOf(
|
||||||
ChatItem.getSampleData(
|
ChatItem.getSampleData(
|
||||||
@ -815,6 +816,7 @@ fun PreviewChatListNavLinkGroup() {
|
|||||||
chatLinkPreview = {
|
chatLinkPreview = {
|
||||||
ChatPreviewView(
|
ChatPreviewView(
|
||||||
Chat(
|
Chat(
|
||||||
|
remoteHostId = null,
|
||||||
chatInfo = ChatInfo.Group.sampleData,
|
chatInfo = ChatInfo.Group.sampleData,
|
||||||
chatItems = listOf(
|
chatItems = listOf(
|
||||||
ChatItem.getSampleData(
|
ChatItem.getSampleData(
|
||||||
|
Loading…
Reference in New Issue
Block a user