diff --git a/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/community/CommunityPage.kt b/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/community/CommunityPage.kt index 40ca8d0..a469e0b 100644 --- a/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/community/CommunityPage.kt +++ b/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/community/CommunityPage.kt @@ -20,10 +20,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import androidx.lifecycle.ViewModel -import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.viewModelScope -import androidx.lifecycle.viewmodel.CreationExtras import androidx.lifecycle.viewmodel.compose.viewModel import androidx.paging.ExperimentalPagingApi import app.cash.paging.compose.collectAsLazyPagingItems @@ -45,7 +42,6 @@ import com.storyteller_f.shared.type.PrimaryKey import io.ktor.client.* import kotlinx.coroutines.launch import org.jetbrains.compose.resources.stringResource -import kotlin.reflect.KClass data class OnCommunityJoined(val communityId: PrimaryKey) diff --git a/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/topic/TopicCell.kt b/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/topic/TopicCell.kt index 4023e0f..d453c93 100644 --- a/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/topic/TopicCell.kt +++ b/composeApp/src/commonMain/kotlin/com/storyteller_f/a/app/topic/TopicCell.kt @@ -27,8 +27,8 @@ import com.mikepenz.markdown.compose.elements.MarkdownCodeFence import com.mikepenz.markdown.m3.markdownColor import com.mikepenz.markdown.m3.markdownTypography import com.storyteller_f.a.app.common.StateView2 -import com.storyteller_f.a.app.community.CommunityRefCell import com.storyteller_f.a.app.common.viewModel +import com.storyteller_f.a.app.community.CommunityRefCell import com.storyteller_f.a.app.compontents.ReactionRow import com.storyteller_f.a.app.compontents.TextUnitToPx import com.storyteller_f.a.app.compontents.UserIcon diff --git a/server/src/test/kotlin/CommunityTest.kt b/server/src/test/kotlin/CommunityTest.kt index 19992c5..9a85eba 100644 --- a/server/src/test/kotlin/CommunityTest.kt +++ b/server/src/test/kotlin/CommunityTest.kt @@ -62,7 +62,7 @@ class CommunityTest { } // 添加话题到子话题 kotlin.run { - val topicId = client.getCommunityTopics(communityId, 10).data.first().id + val topicId = client.getCommunityTopics(communityId, null, 10).data.first().id val new = client.createNewTopic(ObjectType.TOPIC, topicId, "test").body() assertEquals(ObjectType.COMMUNITY, new.rootType) assertEquals(communityId, new.rootId)