Repository navigation
Fix UI padding, rename Meet to Meetings, wire Add Account, default swipe to archive, and add rich HTML email + brand logos #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -73,6 +73,7 @@ fun MailNavGraph( | |||||
| uiState: MailUiState | ||||||
| ) { | ||||||
| val navController = rememberNavController() | ||||||
| val nativeAuth by viewModel.nativeAuth.collectAsStateWithLifecycle() | ||||||
| val context = LocalContext.current | ||||||
| val activity = context as? android.app.Activity | ||||||
|
|
||||||
|
|
@@ -327,4 +328,19 @@ fun MailNavGraph( | |||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| NativeAuthSheet( | ||||||
| state = nativeAuth, | ||||||
| onDismiss = viewModel::dismissNativeAuth, | ||||||
| onSubmitIdentifier = viewModel::nativeSubmitIdentifier, | ||||||
| onSubmitPassword = viewModel::nativeSubmitPassword, | ||||||
| onSubmitMfa = viewModel::nativeSubmitMfa, | ||||||
| onSubmitSignUp = viewModel::nativeSubmitSignUp, | ||||||
| onForgotPassword = viewModel::nativeForgotPassword, | ||||||
| onResetPassword = viewModel::nativeResetPassword, | ||||||
| onSwitchToSignUp = viewModel::openNativeSignUp, | ||||||
| onSwitchToSignIn = viewModel::openNativeSignIn, | ||||||
| onUpdate = viewModel::nativeAuthUpdate, | ||||||
| onBrowserSignIn = { activity?.let { viewModel.signIn(it, chooseAccount = true) } } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Close the native sign-in sheet when browser sign-in starts. The browser fallback in Suggested fix
Committable suggestion
|
||||||
| ) | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,7 +246,8 @@ fun InboxScreen( | |
| bottomBar = { | ||
| if (!isWideScreen && !uiState.isSelectionMode) { | ||
| NavigationBar( | ||
| containerColor = MaterialTheme.colorScheme.surfaceContainerLow | ||
| containerColor = MaterialTheme.colorScheme.surfaceContainerLow, | ||
| modifier = Modifier.height(64.dp) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed 64 dp height leaves the navigation items too little space when a bottom inset is present. The bottom Keep the bar's content height independent of the bottom inset. The bar must reserve the inset in addition to the intended 64 dp item area, or the inset must be handled outside the fixed-height container. Choose the approach that keeps the design target. Verify the layout on a device with a large bottom inset.
|
||
| ) { | ||
| NavigationBarItem( | ||
| selected = uiState.activeBottomTab == BottomNavTab.MAIL, | ||
|
|
@@ -325,8 +326,8 @@ fun InboxScreen( | |
| NavigationRailItem( | ||
| selected = uiState.activeBottomTab == BottomNavTab.MEET, | ||
| onClick = { onSelectBottomTab(BottomNavTab.MEET) }, | ||
| icon = { Icon(Icons.Rounded.Videocam, contentDescription = "Meet") }, | ||
| label = { Text("Meet") } | ||
| icon = { Icon(Icons.Rounded.Videocam, contentDescription = "Meetings") }, | ||
| label = { Text("Meetings") } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -408,10 +409,11 @@ fun InboxScreen( | |
| PillSearchTopBar( | ||
| activeAccountName = uiState.activeAccount?.displayName ?: "Bansify User", | ||
| activeAccountColor = uiState.activeAccount?.avatarColorHex ?: 0xFF0B57D0, | ||
| activeAccountEmail = uiState.activeAccount?.email, | ||
| onOpenDrawer = { scope.launch { drawerState.open() } }, | ||
| onOpenSearch = onOpenSearch, | ||
| onOpenAccountSwitcher = { showAccountDialog = true }, | ||
| modifier = if (isWideScreen) Modifier else Modifier.statusBarsPadding() | ||
| modifier = Modifier | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -424,7 +426,7 @@ fun InboxScreen( | |
| LazyColumn( | ||
| state = listState, | ||
| modifier = Modifier.fillMaxSize(), | ||
| contentPadding = PaddingValues(bottom = 96.dp) | ||
| contentPadding = PaddingValues(bottom = 80.dp) | ||
| ) { | ||
| // Current Folder Label + Quick Filters | ||
| item(key = "folder_header") { | ||
|
|
@@ -664,15 +666,16 @@ private fun PillSearchTopBar( | |
| onOpenDrawer: () -> Unit, | ||
| onOpenSearch: () -> Unit, | ||
| onOpenAccountSwitcher: () -> Unit, | ||
| modifier: Modifier = Modifier | ||
| modifier: Modifier = Modifier, | ||
| activeAccountEmail: String? = null | ||
| ) { | ||
| Surface( | ||
| shape = RoundedCornerShape(28.dp), | ||
| color = MaterialTheme.colorScheme.surfaceContainerHigh, | ||
| tonalElevation = 2.dp, | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .padding(horizontal = 16.dp, vertical = 10.dp) | ||
| .padding(horizontal = 16.dp, vertical = 6.dp) | ||
| .height(52.dp) | ||
| .clip(RoundedCornerShape(28.dp)) | ||
| .clickable(onClick = onOpenSearch) | ||
|
|
@@ -707,6 +710,7 @@ private fun PillSearchTopBar( | |
| SenderAvatar( | ||
| name = activeAccountName, | ||
| colorHex = activeAccountColor, | ||
| email = activeAccountEmail, | ||
| size = 32.dp, | ||
| onClick = onOpenAccountSwitcher, | ||
| modifier = Modifier.testTag("account_avatar_button") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve the downloaded To and Cc recipients.
When
existing.messagesis empty, this branch replaces the actual recipients with the account email and leavesrecipientsCcempty. For a message addressed to the account and Bob, with Carol copied, the saved message loses Bob and Carol.buildComposeForReplyuses these fields, so “Reply all” omits both recipients. PopulaterecipientsTofrommessage.toandrecipientsCcfrommessage.cc. (raw.githubusercontent.com)