add posts list model

This commit is contained in:
InsanusMokrassar 2022-03-26 11:53:53 +06:00
parent 90293d7ffc
commit 51cdfb320b
6 changed files with 22 additions and 5 deletions

View File

@ -9,8 +9,8 @@ import dev.inmo.postssystem.features.common.common.baseKoin
import dev.inmo.postssystem.features.common.common.getAllDistinct
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMHandler
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMStateSerializer
import dev.inmo.postssystem.services.posts.client.ui.posts_list.PostsListUIFSMState
import dev.inmo.postssystem.services.posts.client.ui.posts_list.PostsListUIState
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIFSMState
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIState
import kotlinx.browser.*
import kotlinx.coroutines.*
import kotlinx.serialization.builtins.serializer

View File

@ -4,7 +4,7 @@ import dev.inmo.postssystem.features.auth.client.AuthorizedModuleLoader
import dev.inmo.postssystem.features.auth.client.AuthorizedQualifiers
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMStateSerializer
import dev.inmo.postssystem.services.posts.client.ui.create.*
import dev.inmo.postssystem.services.posts.client.ui.posts_list.PostsListUIFSMState
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIFSMState
import dev.inmo.postssystem.services.posts.common.*
import org.koin.dsl.binds

View File

@ -0,0 +1,8 @@
package dev.inmo.postssystem.services.posts.client.ui.list
import dev.inmo.postssystem.features.common.common.ui.AbstractUIModel
class DefaultPostsListUIModel : PostsListUIModel, AbstractUIModel<PostsListUIState>(
PostsListUIState.Loading
) {
}

View File

@ -1,4 +1,4 @@
package dev.inmo.postssystem.services.posts.client.ui.posts_list
package dev.inmo.postssystem.services.posts.client.ui.list
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMState
import kotlinx.serialization.Serializable

View File

@ -0,0 +1,8 @@
package dev.inmo.postssystem.services.posts.client.ui.list
import dev.inmo.postssystem.features.common.common.ui.UIModel
import dev.inmo.postssystem.features.common.common.ui.UIViewModel
import dev.inmo.postssystem.features.content.common.Content
interface PostsListUIModel : UIModel<PostsListUIState>, UIViewModel<PostsListUIState> {
}

View File

@ -1,4 +1,4 @@
package dev.inmo.postssystem.services.posts.client.ui.posts_list
package dev.inmo.postssystem.services.posts.client.ui.list
import dev.inmo.postssystem.features.posts.common.Post
import kotlinx.serialization.Serializable
@ -7,6 +7,7 @@ import kotlinx.serialization.Serializable
sealed class PostsListUIState {
@Serializable
object Loading : PostsListUIState()
@Serializable
data class Show(
val posts: List<Post>