From 860402bf71e0742362e3f75a241b1baa3ef8c800 Mon Sep 17 00:00:00 2001 From: easyhz Date: Mon, 19 Aug 2024 11:49:47 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20home=20empty=20view=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20#95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../noffice/feature/home/screen/home/HomeScreen.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/feature/home/src/main/java/com/easyhz/noffice/feature/home/screen/home/HomeScreen.kt b/feature/home/src/main/java/com/easyhz/noffice/feature/home/screen/home/HomeScreen.kt index cbdba8b6..23efacd5 100644 --- a/feature/home/src/main/java/com/easyhz/noffice/feature/home/screen/home/HomeScreen.kt +++ b/feature/home/src/main/java/com/easyhz/noffice/feature/home/screen/home/HomeScreen.kt @@ -2,17 +2,21 @@ package com.easyhz.noffice.feature.home.screen.home import androidx.compose.animation.Crossfade import androidx.compose.animation.core.tween +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle +import androidx.paging.LoadState import androidx.paging.compose.collectAsLazyPagingItems import com.easyhz.noffice.core.common.util.collectInSideEffectWithLifecycle +import com.easyhz.noffice.core.design_system.component.exception.ExceptionView import com.easyhz.noffice.core.design_system.component.scaffold.NofficeScaffold import com.easyhz.noffice.core.design_system.component.topBar.HomeTopBar import com.easyhz.noffice.core.design_system.extension.screenHorizonPadding +import com.easyhz.noffice.core.design_system.util.exception.ExceptionType import com.easyhz.noffice.feature.home.component.notice.NoticeView import com.easyhz.noffice.feature.home.component.task.TaskView import com.easyhz.noffice.feature.home.contract.home.HomeIntent @@ -42,6 +46,12 @@ fun HomeScreen( } } ) { paddingValues -> + if(organizationList.itemCount == 0 && organizationList.loadState.refresh != LoadState.Loading) { + ExceptionView( + modifier = Modifier.fillMaxSize(), + type = ExceptionType.NO_ORGANIZATION + ) + } Crossfade( targetState = uiState.topBarMenu, animationSpec = tween(500),