@@ -306,7 +306,7 @@ class MainActivity : BaseActivity() {
306
306
)
307
307
}
308
308
309
- // Still display the snackbar even if it took three times 10 seconds of timeout to succeed
309
+ // Still display the Snackbar even if it took three times 10 seconds of timeout to succeed
310
310
private fun showSentDraftSnackbar () {
311
311
showSendingSnackbarTimer.cancel()
312
312
snackbarManager.setValue(getString(R .string.snackbarEmailSent))
@@ -433,45 +433,12 @@ class MainActivity : BaseActivity() {
433
433
// This `SuppressLint` seems useless, but it's for the CI. Don't remove it.
434
434
@SuppressLint(" RestrictedApi" )
435
435
private fun onDestinationChanged (destination : NavDestination , arguments : Bundle ? ) {
436
-
437
436
SentryDebug .addNavigationBreadcrumb(destination.displayName, arguments)
438
437
trackDestination(destination)
439
-
440
- updateColorsWhenDestinationChanged(destination.id)
441
438
setDrawerLockMode(isLocked = destination.id != R .id.threadListFragment)
442
-
443
439
previousDestinationId = destination.id
444
440
}
445
441
446
- private fun updateColorsWhenDestinationChanged (destinationId : Int ) {
447
-
448
- when (destinationId) {
449
- R .id.junkBottomSheetDialog,
450
- R .id.messageActionsBottomSheetDialog,
451
- R .id.replyBottomSheetDialog,
452
- R .id.detailedContactBottomSheetDialog,
453
- R .id.threadActionsBottomSheetDialog,
454
- R .id.attachmentActionsBottomSheetDialog,
455
- R .id.downloadAttachmentProgressDialog,
456
- R .id.attendeesBottomSheetDialog -> null
457
- R .id.searchFragment -> R .color.backgroundColor
458
- else -> R .color.backgroundHeaderColor
459
- }?.let { statusBarColor ->
460
- window.statusBarColor = getColor(statusBarColor)
461
- }
462
-
463
- when (destinationId) {
464
- R .id.messageActionsBottomSheetDialog,
465
- R .id.replyBottomSheetDialog,
466
- R .id.detailedContactBottomSheetDialog,
467
- R .id.threadActionsBottomSheetDialog -> R .color.backgroundColorSecondary
468
- R .id.threadListFragment -> if (mainViewModel.isMultiSelectOn) R .color.elevatedBackground else R .color.backgroundColor
469
- else -> R .color.backgroundColor
470
- }.let { navigationBarColor ->
471
- window.updateNavigationBarColor(getColor(navigationBarColor))
472
- }
473
- }
474
-
475
442
fun setDrawerLockMode (isLocked : Boolean ) {
476
443
val drawerLockMode = if (isLocked) DrawerLayout .LOCK_MODE_LOCKED_CLOSED else DrawerLayout .LOCK_MODE_UNLOCKED
477
444
binding.drawerLayout.setDrawerLockMode(drawerLockMode)
0 commit comments