Loading feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt +3 −1 Original line number Diff line number Diff line Loading @@ -12,10 +12,11 @@ internal fun DrawerContentPreview() { PreviewWithTheme { DrawerContent( state = DrawerContract.State( currentAccount = null, accounts = persistentListOf(), currentAccount = null, folders = persistentListOf(), ), onEvent = {}, ) } } Loading @@ -29,6 +30,7 @@ fun DrawerContentWithAccountPreview() { accounts = persistentListOf(DISPLAY_ACCOUNT), currentAccount = DISPLAY_ACCOUNT, ), onEvent = {}, ) } } feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountViewPreview.kt +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ internal fun AccountViewPreview() { displayName = DISPLAY_NAME, emailAddress = EMAIL_ADDRESS, accountColor = 0, onClick = {}, ) } } Loading @@ -27,6 +28,7 @@ internal fun AccountViewWithColorPreview() { displayName = DISPLAY_NAME, emailAddress = EMAIL_ADDRESS, accountColor = 0xFF0000, onClick = {}, ) } } Loading @@ -39,6 +41,7 @@ internal fun AccountViewWithLongDisplayName() { displayName = "$LONG_TEXT $DISPLAY_NAME", emailAddress = EMAIL_ADDRESS, accountColor = 0, onClick = {}, ) } } Loading @@ -51,6 +54,7 @@ internal fun AccountViewWithLongEmailPreview() { displayName = DISPLAY_NAME, emailAddress = "$LONG_TEXT@example.com", accountColor = 0, onClick = {}, ) } } feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import androidx.compose.ui.platform.testTag import app.k9mail.core.ui.compose.designsystem.atom.DividerHorizontal import app.k9mail.core.ui.compose.designsystem.atom.Surface import app.k9mail.core.ui.compose.theme2.MainTheme import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Event import app.k9mail.feature.navigation.drawer.ui.DrawerContract.State import app.k9mail.feature.navigation.drawer.ui.account.AccountView import app.k9mail.feature.navigation.drawer.ui.folder.FolderList Loading @@ -17,6 +18,7 @@ import app.k9mail.feature.navigation.drawer.ui.folder.FolderList @Composable fun DrawerContent( state: State, onEvent: (Event) -> Unit, modifier: Modifier = Modifier, ) { Surface( Loading @@ -37,6 +39,7 @@ fun DrawerContent( displayName = it.account.displayName, emailAddress = it.account.email, accountColor = it.account.chipColor, onClick = { onEvent(Event.OnAccountViewClick(it)) }, ) DividerHorizontal() Loading feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import app.k9mail.core.ui.compose.common.mvi.UnidirectionalViewModel import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount import app.k9mail.legacy.ui.folder.DisplayFolder import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.immutableListOf import kotlinx.collections.immutable.persistentListOf interface DrawerContract { Loading @@ -23,6 +22,8 @@ interface DrawerContract { sealed interface Event { data object OnRefresh : Event data class OnAccountClick(val account: DisplayAccount) : Event data class OnAccountViewClick(val account: DisplayAccount) : Event } sealed interface Effect Loading feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt +2 −1 Original line number Diff line number Diff line Loading @@ -3,9 +3,9 @@ package app.k9mail.feature.navigation.drawer.ui import androidx.compose.runtime.Composable import app.k9mail.core.ui.compose.common.mvi.observe import app.k9mail.core.ui.compose.designsystem.molecule.PullToRefreshBox import org.koin.androidx.compose.koinViewModel import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Event import app.k9mail.feature.navigation.drawer.ui.DrawerContract.ViewModel import org.koin.androidx.compose.koinViewModel @Composable fun DrawerView( Loading @@ -19,6 +19,7 @@ fun DrawerView( ) { DrawerContent( state = state.value, onEvent = { dispatch(it) }, ) } } Loading
feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt +3 −1 Original line number Diff line number Diff line Loading @@ -12,10 +12,11 @@ internal fun DrawerContentPreview() { PreviewWithTheme { DrawerContent( state = DrawerContract.State( currentAccount = null, accounts = persistentListOf(), currentAccount = null, folders = persistentListOf(), ), onEvent = {}, ) } } Loading @@ -29,6 +30,7 @@ fun DrawerContentWithAccountPreview() { accounts = persistentListOf(DISPLAY_ACCOUNT), currentAccount = DISPLAY_ACCOUNT, ), onEvent = {}, ) } }
feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountViewPreview.kt +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ internal fun AccountViewPreview() { displayName = DISPLAY_NAME, emailAddress = EMAIL_ADDRESS, accountColor = 0, onClick = {}, ) } } Loading @@ -27,6 +28,7 @@ internal fun AccountViewWithColorPreview() { displayName = DISPLAY_NAME, emailAddress = EMAIL_ADDRESS, accountColor = 0xFF0000, onClick = {}, ) } } Loading @@ -39,6 +41,7 @@ internal fun AccountViewWithLongDisplayName() { displayName = "$LONG_TEXT $DISPLAY_NAME", emailAddress = EMAIL_ADDRESS, accountColor = 0, onClick = {}, ) } } Loading @@ -51,6 +54,7 @@ internal fun AccountViewWithLongEmailPreview() { displayName = DISPLAY_NAME, emailAddress = "$LONG_TEXT@example.com", accountColor = 0, onClick = {}, ) } }
feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import androidx.compose.ui.platform.testTag import app.k9mail.core.ui.compose.designsystem.atom.DividerHorizontal import app.k9mail.core.ui.compose.designsystem.atom.Surface import app.k9mail.core.ui.compose.theme2.MainTheme import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Event import app.k9mail.feature.navigation.drawer.ui.DrawerContract.State import app.k9mail.feature.navigation.drawer.ui.account.AccountView import app.k9mail.feature.navigation.drawer.ui.folder.FolderList Loading @@ -17,6 +18,7 @@ import app.k9mail.feature.navigation.drawer.ui.folder.FolderList @Composable fun DrawerContent( state: State, onEvent: (Event) -> Unit, modifier: Modifier = Modifier, ) { Surface( Loading @@ -37,6 +39,7 @@ fun DrawerContent( displayName = it.account.displayName, emailAddress = it.account.email, accountColor = it.account.chipColor, onClick = { onEvent(Event.OnAccountViewClick(it)) }, ) DividerHorizontal() Loading
feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt +2 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import app.k9mail.core.ui.compose.common.mvi.UnidirectionalViewModel import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount import app.k9mail.legacy.ui.folder.DisplayFolder import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.immutableListOf import kotlinx.collections.immutable.persistentListOf interface DrawerContract { Loading @@ -23,6 +22,8 @@ interface DrawerContract { sealed interface Event { data object OnRefresh : Event data class OnAccountClick(val account: DisplayAccount) : Event data class OnAccountViewClick(val account: DisplayAccount) : Event } sealed interface Effect Loading
feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt +2 −1 Original line number Diff line number Diff line Loading @@ -3,9 +3,9 @@ package app.k9mail.feature.navigation.drawer.ui import androidx.compose.runtime.Composable import app.k9mail.core.ui.compose.common.mvi.observe import app.k9mail.core.ui.compose.designsystem.molecule.PullToRefreshBox import org.koin.androidx.compose.koinViewModel import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Event import app.k9mail.feature.navigation.drawer.ui.DrawerContract.ViewModel import org.koin.androidx.compose.koinViewModel @Composable fun DrawerView( Loading @@ -19,6 +19,7 @@ fun DrawerView( ) { DrawerContent( state = state.value, onEvent = { dispatch(it) }, ) } }