Loading core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/icon/Icons.kt +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import androidx.compose.material.icons.outlined.Menu import androidx.compose.material.icons.outlined.Report import androidx.compose.material.icons.outlined.Security import androidx.compose.material.icons.outlined.Settings import androidx.compose.material.icons.outlined.Sync import androidx.compose.material.icons.outlined.Visibility import androidx.compose.ui.graphics.vector.ImageVector import app.k9mail.core.ui.compose.designsystem.atom.icon.filled.Dot Loading Loading @@ -111,6 +112,9 @@ object Icons { val Settings: ImageVector get() = MaterialIcons.Outlined.Settings val Sync: ImageVector get() = MaterialIcons.Outlined.Sync val Report: ImageVector get() = MaterialIcons.Outlined.Report Loading feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountListPreview.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ internal fun AccountListPreview() { selectedAccount = null, onAccountClick = { }, onSettingsClick = { }, onSyncAllAccountsClick = { }, ) } } Loading @@ -32,6 +33,7 @@ internal fun AccountListWithSelectedPreview() { selectedAccount = DISPLAY_ACCOUNT, onAccountClick = { }, onSettingsClick = { }, onSyncAllAccountsClick = { }, ) } } feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/setting/SettingItemPreview.kt +2 −0 Original line number Diff line number Diff line Loading @@ -3,12 +3,14 @@ package app.k9mail.feature.navigation.drawer.ui.setting import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes import app.k9mail.core.ui.compose.designsystem.atom.icon.Icons @Composable @Preview(showBackground = true) internal fun SettingItemPreview() { PreviewWithThemes { SettingItem( icon = Icons.Outlined.Settings, label = "Setting", onClick = {}, ) Loading feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/NavigationDrawerModule.kt +12 −4 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ import app.k9mail.feature.navigation.drawer.domain.DomainContract.UseCase import app.k9mail.feature.navigation.drawer.domain.usecase.GetDisplayAccounts import app.k9mail.feature.navigation.drawer.domain.usecase.GetDisplayFoldersForAccount import app.k9mail.feature.navigation.drawer.domain.usecase.GetDrawerConfig import app.k9mail.feature.navigation.drawer.domain.usecase.SyncMail import app.k9mail.feature.navigation.drawer.domain.usecase.SyncAccount import app.k9mail.feature.navigation.drawer.domain.usecase.SyncAllAccounts import app.k9mail.feature.navigation.drawer.legacy.AccountsViewModel import app.k9mail.feature.navigation.drawer.legacy.FoldersViewModel import app.k9mail.feature.navigation.drawer.ui.DrawerViewModel Loading Loading @@ -37,8 +38,14 @@ val navigationDrawerModule: Module = module { ) } single<UseCase.SyncMail> { SyncMail( single<UseCase.SyncAccount> { SyncAccount( messagingController = get(), ) } single<UseCase.SyncAllAccounts> { SyncAllAccounts( messagingController = get(), ) } Loading Loading @@ -66,7 +73,8 @@ val navigationDrawerModule: Module = module { getDrawerConfig = get(), getDisplayAccounts = get(), getDisplayFoldersForAccount = get(), syncMail = get(), syncAccount = get(), syncAllAccounts = get(), ) } } feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt +10 −5 Original line number Diff line number Diff line Loading @@ -22,12 +22,17 @@ internal interface DomainContract { } /** * Synchronize mail for the given account. * * Account can be null to synchronize unified inbox or account list. * Synchronize the given account. */ fun interface SyncMail { operator fun invoke(account: Account?): Flow<Result<Unit>> fun interface SyncAccount { operator fun invoke(account: Account): Flow<Result<Unit>> } /** * Synchronize all accounts. */ fun interface SyncAllAccounts { operator fun invoke(): Flow<Result<Unit>> } } } Loading
core/ui/compose/designsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/icon/Icons.kt +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import androidx.compose.material.icons.outlined.Menu import androidx.compose.material.icons.outlined.Report import androidx.compose.material.icons.outlined.Security import androidx.compose.material.icons.outlined.Settings import androidx.compose.material.icons.outlined.Sync import androidx.compose.material.icons.outlined.Visibility import androidx.compose.ui.graphics.vector.ImageVector import app.k9mail.core.ui.compose.designsystem.atom.icon.filled.Dot Loading Loading @@ -111,6 +112,9 @@ object Icons { val Settings: ImageVector get() = MaterialIcons.Outlined.Settings val Sync: ImageVector get() = MaterialIcons.Outlined.Sync val Report: ImageVector get() = MaterialIcons.Outlined.Report Loading
feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountListPreview.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ internal fun AccountListPreview() { selectedAccount = null, onAccountClick = { }, onSettingsClick = { }, onSyncAllAccountsClick = { }, ) } } Loading @@ -32,6 +33,7 @@ internal fun AccountListWithSelectedPreview() { selectedAccount = DISPLAY_ACCOUNT, onAccountClick = { }, onSettingsClick = { }, onSyncAllAccountsClick = { }, ) } }
feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/setting/SettingItemPreview.kt +2 −0 Original line number Diff line number Diff line Loading @@ -3,12 +3,14 @@ package app.k9mail.feature.navigation.drawer.ui.setting import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes import app.k9mail.core.ui.compose.designsystem.atom.icon.Icons @Composable @Preview(showBackground = true) internal fun SettingItemPreview() { PreviewWithThemes { SettingItem( icon = Icons.Outlined.Settings, label = "Setting", onClick = {}, ) Loading
feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/NavigationDrawerModule.kt +12 −4 Original line number Diff line number Diff line Loading @@ -4,7 +4,8 @@ import app.k9mail.feature.navigation.drawer.domain.DomainContract.UseCase import app.k9mail.feature.navigation.drawer.domain.usecase.GetDisplayAccounts import app.k9mail.feature.navigation.drawer.domain.usecase.GetDisplayFoldersForAccount import app.k9mail.feature.navigation.drawer.domain.usecase.GetDrawerConfig import app.k9mail.feature.navigation.drawer.domain.usecase.SyncMail import app.k9mail.feature.navigation.drawer.domain.usecase.SyncAccount import app.k9mail.feature.navigation.drawer.domain.usecase.SyncAllAccounts import app.k9mail.feature.navigation.drawer.legacy.AccountsViewModel import app.k9mail.feature.navigation.drawer.legacy.FoldersViewModel import app.k9mail.feature.navigation.drawer.ui.DrawerViewModel Loading Loading @@ -37,8 +38,14 @@ val navigationDrawerModule: Module = module { ) } single<UseCase.SyncMail> { SyncMail( single<UseCase.SyncAccount> { SyncAccount( messagingController = get(), ) } single<UseCase.SyncAllAccounts> { SyncAllAccounts( messagingController = get(), ) } Loading Loading @@ -66,7 +73,8 @@ val navigationDrawerModule: Module = module { getDrawerConfig = get(), getDisplayAccounts = get(), getDisplayFoldersForAccount = get(), syncMail = get(), syncAccount = get(), syncAllAccounts = get(), ) } }
feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt +10 −5 Original line number Diff line number Diff line Loading @@ -22,12 +22,17 @@ internal interface DomainContract { } /** * Synchronize mail for the given account. * * Account can be null to synchronize unified inbox or account list. * Synchronize the given account. */ fun interface SyncMail { operator fun invoke(account: Account?): Flow<Result<Unit>> fun interface SyncAccount { operator fun invoke(account: Account): Flow<Result<Unit>> } /** * Synchronize all accounts. */ fun interface SyncAllAccounts { operator fun invoke(): Flow<Result<Unit>> } } }