Repository: thunderbird/thunderbird-android (language: kotlin)

Issue:
Account accent color does not take effect immediately in Thunderbird Android
### Checklist

- [X] I have used the search function to see if someone else has already submitted the same bug report.
- [X] I will describe the problem with as much detail as possible.

### App

Thunderbird for Android

### App version

8.0

### Where did you get the app from?

Google Play

### Android version

14

### Device model

Pixel 6

### Steps to reproduce

1. Launch Thunderbird
2. Menu icon (upper left)
3. Select **Settings** (gear icon, lower left)
4. Choose any account from **Accounts** list
5. Select **General settings** (gear icon)
6. Select **Account color**
7. Choose any **Account color** that is not active
8. Press back **<- General settings**
9. Press back **<- Account settings**
10. Press back **<- Settings**

Observe that account's accent color has not changed

### Expected behavior

Upon returning to list of accounts, the accent color of the previously chosen account should reflect the newly chosen one.

### Actual behavior

The chosen account's accent color remains the same as before selecting the new accent color.

### Logs

--------- beginning of main
11-07 22:32:43.428 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:32:43.428 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:32:46.209 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:32:46.209 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:32:46.364 18489 18494 W derbird.android: Cleared Reference was only reachable from finalizer (only reported once)
11-07 22:32:46.399 18489 18494 I derbird.android: Background concurrent mark compact GC freed 18MB AllocSpace bytes, 2(40KB) LOS objects, 75% free, 15MB/61MB, paused 905us,1.755ms total 105.869ms
11-07 22:32:50.793 18489 18489 W Choreographer: Frame time is 0.002467 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
11-07 22:32:51.261 18489 18489 I ImeTracker: net.thunderbird.android:2dce6ba9: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
11-07 22:32:52.881 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:32:52.881 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:33:53.313 18489 18489 D VRI[MessageList]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:35:15.985 18489 18489 I ImeTracker: net.thunderbird.android:2677af0f: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
11-07 22:35:16.547 18489 18489 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:35:17.059 18489 18489 D VRI[MessageList]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:35:17.067 18489 18511 D HWUI    : endAllActiveAnimators on 0xb400007d1c2e4950 (UnprojectedRipple) with handle 0xb400007d3c369b90
11-07 22:35:17.633 18489 18489 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:17.652 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:18.170 18489 18489 D VRI[SettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:35:18.185 18489 18511 D HWUI    : endAllActiveAnimators on 0xb400007d1c45f970 (FrameLayout) with handle 0xb400007d3c3498b0
11-07 22:35:21.409 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:35:21.409 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:35:21.466 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:21.466 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:24.814 18489 18543 I K9StorageEditor: Committing preference changes
11-07 22:35:24.824 18489 18543 I K9StorageEditor: Preferences commit took 13 ms
11-07 22:35:43.351 18489 18489 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@e100aec
11-07 22:35:43.374 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:35:43.374 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:35:43.374 18489 18489 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:35:43.400 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:43.400 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:43.400 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:50.141 18489 18489 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@e07afd
11-07 22:35:50.163 18489 18489 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:35:50.163 18489 18489 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:35:50.163 18489 18489 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:35:50.184 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:50.185 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:50.185 18489 18489 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:51.558 18489 18489 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:35:53.069 18489 18489 D VRI[GeneralSettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:35:53.086 18489 18489 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@86c7604
11-07 22:35:54.386 18489 18509 I MessagingController: Running command 'clearNotifications', seq = 12 (foreground priority)
11-07 22:35:54.386 18489 18509 V NotificationController: Removing some notifications for account 41de4aba-8b3f-43d6-82d3-d7de577ab3c5
11-07 22:35:54.386 18489 18509 I MessagingController:  Command 'clearNotifications' completed
11-07 22:35:54.923 18489 18489 D VRI[SettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:35:54.936 18489 18489 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@5fd414d
11-07 22:35:57.479 18489 18489 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@a55fcec
11-07 22:35:57.480 18489 18489 D AutofillManager: view not autofillable - not passing ime action check
11-07 22:35:57.481 18489 18489 D AutofillManager: view not autofillable - not passing ime action check
11-07 22:35:58.860 19825 19825 I derbird.android: Using CollectorTypeCMC GC.
11-07 22:35:58.862 19825 19825 E derbird.android: Not starting debugger since process cannot load the jdwp agent.
11-07 22:35:58.864 19825 19825 D nativeloader: Load libframework-connectivity-tiramisu-jni.so using APEX ns com_android_tethering for caller /apex/com.android.tethering/javalib/framework-connectivity-t.jar: ok
11-07 22:35:58.870 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10436; state: ENABLED
11-07 22:35:58.870 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 242716250; UID 10436; state: ENABLED
11-07 22:35:58.880 19825 19825 W ziparchive: Unable to open '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.arm64_v8a.dm': No such file or directory
11-07 22:35:58.880 19825 19825 W ziparchive: Unable to open '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.arm64_v8a.dm': No such file or directory
11-07 22:35:58.881 19825 19825 W derbird.android: Entry not found
11-07 22:35:58.881 19825 19825 W ziparchive: Unable to open '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.xxhdpi.dm': No such file or directory
11-07 22:35:58.881 19825 19825 W ziparchive: Unable to open '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.xxhdpi.dm': No such file or directory
11-07 22:35:58.881 19825 19825 W derbird.android: Entry not found
11-07 22:35:58.882 19825 19825 D nativeloader: Configuring clns-4 for other apk /data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/base.apk:/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.arm64_v8a.apk:/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.xxhdpi.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/lib/arm64:/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/base.apk!/lib/arm64-v8a:/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.arm64_v8a.apk!/lib/arm64-v8a:/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.xxhdpi.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/net.thunderbird.android
11-07 22:35:58.885 19825 19825 V GraphicsEnvironment: Currently set values for:
11-07 22:35:58.885 19825 19825 V GraphicsEnvironment:   angle_gl_driver_selection_pkgs=[com.android.angle, com.linecorp.b612.android, com.campmobile.snow, com.google.android.apps.tachyon]
11-07 22:35:58.885 19825 19825 V GraphicsEnvironment:   angle_gl_driver_selection_values=[angle, native, native, native]
11-07 22:35:58.885 19825 19825 V GraphicsEnvironment: net.thunderbird.android is not listed in per-application setting
11-07 22:35:58.885 19825 19825 V GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
11-07 22:35:58.901 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 279646685; UID 10436; state: DISABLED
11-07 22:35:58.914 19825 19825 D WM-PackageManagerHelper: Skipping component enablement for androidx.work.impl.background.systemjob.SystemJobService
11-07 22:35:58.914 19825 19825 D WM-Schedulers: Created SystemJobScheduler and enabled SystemJobService
11-07 22:35:58.915 19825 19825 V K9JobManager: scheduling all jobs
11-07 22:35:58.915 19825 19825 V K9JobManager: canceling mail sync job
11-07 22:35:58.915 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for 41de4aba-8b3f-43d6-82d3-d7de577ab3c5
11-07 22:35:58.915 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.916 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:22:53 EST 2024
11-07 22:35:58.916 19825 19825 V MailSyncWorkerManager:   initial delay: 2814828 ms
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for a9bc80b5-f8eb-4937-ace7-b252941bb023
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:22:55 EST 2024
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   initial delay: 2816356 ms
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for b3db8739-33dd-44db-9840-dab97a98a4e5
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:23:20 EST 2024
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   initial delay: 2841103 ms
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for d41921b1-dbd6-4a01-b46c-e27dc279041f
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:26:15 EST 2024
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   initial delay: 3017057 ms
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for 1db8b0f8-742f-447f-aa27-45919f7809db
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:24:38 EST 2024
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   initial delay: 2919165 ms
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager: Scheduling mail sync worker for 63fcc29f-5171-4e9a-a069-d88f2bca67a1
11-07 22:35:58.917 19825 19825 V MailSyncWorkerManager:   sync interval: 60 minutes
11-07 22:35:58.918 19825 19825 V MailSyncWorkerManager:   last sync time: Thu Nov 07 22:24:38 EST 2024
11-07 22:35:58.918 19825 19825 V MailSyncWorkerManager:   initial delay: 2919164 ms
11-07 22:35:58.918 19825 19825 V SystemLocaleManager: Enable LocaleBroadcastReceiver
11-07 22:35:58.919 19825 19839 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10436; state: ENABLED
11-07 22:35:58.929 19825 19839 D CompatibilityChangeReporter: Compat change id reported: 194532703; UID 10436; state: ENABLED
11-07 22:35:58.929 19825 19839 D CompatibilityChangeReporter: Compat change id reported: 253665015; UID 10436; state: ENABLED
11-07 22:35:58.929 19825 19839 D CompatibilityChangeReporter: Compat change id reported: 311402873; UID 10436; state: DISABLED
11-07 22:35:58.929 19825 19839 D CompatibilityChangeReporter: Compat change id reported: 323349338; UID 10436; state: DISABLED
11-07 22:35:58.933 19825 19854 D vulkan  : searching for layers in '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/lib/arm64'
11-07 22:35:58.933 19825 19854 D vulkan  : searching for layers in '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/base.apk!/lib/arm64-v8a'
11-07 22:35:58.933 19825 19854 D vulkan  : searching for layers in '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.arm64_v8a.apk!/lib/arm64-v8a'
11-07 22:35:58.933 19825 19854 D vulkan  : searching for layers in '/data/app/~~eMCYhNkB17fCOAYOMFy9ww==/net.thunderbird.android-FPAIEEPt25XiPqLaxhIqCw==/split_config.xxhdpi.apk!/lib/arm64-v8a'
11-07 22:35:58.934 19825 19854 I DMABUFHEAPS: Using DMA-BUF heap named: vframe-secure
11-07 22:35:58.934 19825 19825 D AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found
11-07 22:35:58.939 19825 19868 V PushController: PushController.initInBackground()
11-07 22:35:58.940 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.950 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10436; state: ENABLED
11-07 22:35:58.950 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 63938206; UID 10436; state: DISABLED
11-07 22:35:58.963 19825 19844 I MessagingController: Running command 'clearNotifications', seq = 0 (foreground priority)
11-07 22:35:58.963 19825 19844 V NotificationController: Removing some notifications for account 41de4aba-8b3f-43d6-82d3-d7de577ab3c5
11-07 22:35:58.963 19825 19844 I MessagingController:  Command 'clearNotifications' completed
11-07 22:35:58.969 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.969 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.969 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.969 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.970 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.971 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.971 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.971 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.971 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.971 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.972 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.972 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.972 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.972 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.972 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.973 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.973 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.973 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.973 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.973 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.974 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.974 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.974 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.974 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.975 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.975 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.975 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.975 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.975 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.976 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.976 19825 19825 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:35:58.976 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.976 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.976 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.976 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.976 19825 19868 V PushController: PushController.updatePushers()
11-07 22:35:58.977 19825 19844 I MessagingController: Running command 'clearNotifications', seq = 1 (foreground priority)
11-07 22:35:58.977 19825 19844 V NotificationController: Removing some notifications for account 41de4aba-8b3f-43d6-82d3-d7de577ab3c5
11-07 22:35:58.977 19825 19844 I MessagingController:  Command 'clearNotifications' completed
11-07 22:35:58.977 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:35:58.977 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:35:58.977 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:35:58.977 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:35:58.979 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 237531167; UID 10436; state: DISABLED
11-07 22:35:58.986 19825 19841 D CompatibilityChangeReporter: Compat change id reported: 247079863; UID 10436; state: ENABLED
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.077 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:35:59.084 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 303326708; UID 10436; state: DISABLED
11-07 22:35:59.086 19825 19825 I ImeTracker: net.thunderbird.android:c898fd28: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
11-07 22:35:59.087 19825 19825 I ImeTracker: net.thunderbird.android:c898fd28: onFailed at PHASE_CLIENT_VIEW_SERVED
11-07 22:35:59.088 19825 19825 D AutofillManager: view not autofillable - not passing ime action check
11-07 22:36:00.916 19825 19825 I ImeTracker: net.thunderbird.android:f1812420: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
11-07 22:36:01.993 19825 19825 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:36:01.993 19825 19825 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:36:02.002 19825 19844 I MessagingController: Running command 'clearNotifications', seq = 2 (foreground priority)
11-07 22:36:02.002 19825 19844 V NotificationController: Removing some notifications for account a9bc80b5-f8eb-4937-ace7-b252941bb023
11-07 22:36:02.002 19825 19844 I MessagingController:  Command 'clearNotifications' completed
11-07 22:36:02.004 19825 19844 I MessagingController: Running command 'clearNotifications', seq = 3 (foreground priority)
11-07 22:36:02.004 19825 19844 V NotificationController: Removing some notifications for account a9bc80b5-f8eb-4937-ace7-b252941bb023
11-07 22:36:02.004 19825 19844 I MessagingController:  Command 'clearNotifications' completed
11-07 22:36:02.097 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 258825825; UID 10436; state: ENABLED
11-07 22:36:03.614 19825 19825 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:36:04.137 19825 19825 D VRI[MessageList]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:04.146 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c40e510 (UnprojectedRipple) with handle 0xb400007d3c32c9c0
11-07 22:36:04.868 19825 19908 D ProfileInstaller: Skipping profile installation for net.thunderbird.android
11-07 22:36:05.306 19825 19825 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:36:05.311 19825 19825 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:36:05.311 19825 19825 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.351 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:05.831 19825 19825 D VRI[SettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:05.846 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c420d30 (DraggableFrameLayout) with handle 0xb400007d3c33fa70
11-07 22:36:06.164 19825 19825 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:36:06.164 19825 19825 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:36:06.189 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:06.190 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:07.296 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10436; state: ENABLED
11-07 22:36:08.462 19825 19825 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@5976748
11-07 22:36:08.477 19825 19914 I K9StorageEditor: Committing preference changes
11-07 22:36:08.486 19825 19914 I K9StorageEditor: Preferences commit took 9 ms
11-07 22:36:08.487 19825 19868 V PushController: PushController.updatePushers()
11-07 22:36:08.488 19825 19868 V PushController: ..Running PushControllers: []
11-07 22:36:08.489 19825 19868 V PushServiceManager: PushServiceManager.stop()
11-07 22:36:08.489 19825 19868 V PushServiceManager: ..PushService is not running
11-07 22:36:08.489 19825 19868 V BootCompleteManager: Disable BootCompleteReceiver
11-07 22:36:09.263 19825 19829 W derbird.android: Cleared Reference was only reachable from finalizer (only reported once)
11-07 22:36:09.294 19825 19829 I derbird.android: Background concurrent mark compact GC freed 19MB AllocSpace bytes, 18(944KB) LOS objects, 75% free, 11MB/46MB, paused 688us,1.749ms total 137.077ms
11-07 22:36:10.526 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.526 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.526 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.526 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.526 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.527 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.527 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:10.527 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:11.629 19825 19825 D VRI[AccountSettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:11.635 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c45b2a0 (RippleDrawable) with handle 0xb400007d3c2f9a20
11-07 22:36:11.646 19825 19825 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@f741d5
11-07 22:36:11.924 19825 19844 I MessagingController: Running command 'clearNotifications', seq = 4 (foreground priority)
11-07 22:36:11.925 19825 19844 V NotificationController: Removing some notifications for account a9bc80b5-f8eb-4937-ace7-b252941bb023
11-07 22:36:11.925 19825 19844 I MessagingController:  Command 'clearNotifications' completed
11-07 22:36:11.932 19825 19828 W derbird.android: Missing inline cache for void androidx.compose.ui.contentcapture.AndroidContentCaptureManager.updateTranslationOnAppeared(androidx.compose.ui.semantics.SemanticsNode)
11-07 22:36:11.932 19825 19828 W derbird.android: Missing inline cache for void androidx.compose.ui.contentcapture.AndroidContentCaptureManager.updateTranslationOnAppeared(androidx.compose.ui.semantics.SemanticsNode)
11-07 22:36:12.447 19825 19825 D VRI[SettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:12.452 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c41aca0 (RippleDrawable) with handle 0xb400007d3c344b70
11-07 22:36:12.461 19825 19825 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@a64f608
11-07 22:36:24.905 19825 19825 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:36:25.411 19825 19825 D VRI[MessageList]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:25.421 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c40e510 (UnprojectedRipple) with handle 0xb400007d3c3401c0
11-07 22:36:32.405 19825 19825 I ContentCaptureHelper: Setting logging level to OFF
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.425 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:32.940 19825 19825 D VRI[SettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:36:32.956 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c4af410 (FrameLayout) with handle 0xb400007d3c33fd70
11-07 22:36:33.476 19825 19825 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:36:33.476 19825 19825 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:36:33.516 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:33.516 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:36:43.644 19825 19825 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
11-07 22:36:45.203 19825 19825 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@1a27cb4
11-07 22:36:45.204 19825 19854 D HWUI    : endAllActiveAnimators on 0xb400007d1c4e8ca0 (MenuPopupWindow$MenuDropDownListView) with handle 0xb400007d3c32c0c0
11-07 22:36:45.551 19825 19825 D VRI[GeneralSettingsActivity]: visibilityChanged oldVisibility=true newVisibility=false
11-07 22:37:15.447 19825 19825 D CompatibilityChangeReporter: Compat change id reported: 78294732; UID 10436; state: ENABLED
11-07 22:37:15.447 19825 19825 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
11-07 22:37:15.447 19825 19825 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
11-07 22:37:15.450 19825 19842 V LogcatLogFileWriter: Writing logcat output to content URI: content://com.dropbox.product.android.dbapp.document_provider.documents/document/aeda29ce-e170-438f-858d-8b3c3b5d73ae
11-07 22:37:15.472 19825 19825 E derbird.android: Invalid resource ID 0x00000000.
11-07 22:37:15.472 19825 19825 E derbird.android: Invalid resource ID 0x00000000.



Discussion hints:
nan

Pull request: Fix drawer not updating on account changes
The `Account` object uses the `uuid` for `equals` and `hasCode` only. This leads to Compose not beeing able to detect change when any other account data was changed. All necessary data is now mapped to `DisplayAccount` to properly allow Compose to detect change.

Fixes #8533

Test command: ./gradlew :feature:navigation:drawer:testDebugUnitTest --tests "app.k9mail.feature.navigation.drawer.ui.DrawerViewKtTest" --tests "app.k9mail.feature.navigation.drawer.ui.DrawerViewModelTest" --tests "app.k9mail.feature.navigation.drawer.ui.DrawerStateTest"

Fix patch:
diff --git a/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt b/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt
index 9d1371d8282..e8f3870c983 100644
--- a/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt
+++ b/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContentPreview.kt
@@ -15,7 +15,7 @@ internal fun DrawerContentPreview() {
         DrawerContent(
             state = DrawerContract.State(
                 accounts = persistentListOf(),
-                selectedAccountUuid = null,
+                selectedAccountId = null,
                 folders = persistentListOf(),
             ),
             onEvent = {},
@@ -30,7 +30,7 @@ internal fun DrawerContentWithAccountPreview() {
         DrawerContent(
             state = DrawerContract.State(
                 accounts = persistentListOf(DISPLAY_ACCOUNT),
-                selectedAccountUuid = DISPLAY_ACCOUNT.uuid,
+                selectedAccountId = DISPLAY_ACCOUNT.id,
                 folders = persistentListOf(),
             ),
             onEvent = {},
@@ -47,7 +47,7 @@ internal fun DrawerContentWithFoldersPreview() {
                 accounts = persistentListOf(
                     DISPLAY_ACCOUNT,
                 ),
-                selectedAccountUuid = null,
+                selectedAccountId = null,
                 folders = persistentListOf(
                     UNIFIED_FOLDER,
                     DISPLAY_FOLDER,
@@ -67,7 +67,7 @@ internal fun DrawerContentWithSelectedFolderPreview() {
                 accounts = persistentListOf(
                     DISPLAY_ACCOUNT,
                 ),
-                selectedAccountUuid = DISPLAY_ACCOUNT.uuid,
+                selectedAccountId = DISPLAY_ACCOUNT.id,
                 folders = persistentListOf(
                     UNIFIED_FOLDER,
                     DISPLAY_FOLDER,
@@ -88,7 +88,7 @@ internal fun DrawerContentWithSelectedUnifiedFolderPreview() {
                 accounts = persistentListOf(
                     DISPLAY_ACCOUNT,
                 ),
-                selectedAccountUuid = DISPLAY_ACCOUNT.uuid,
+                selectedAccountId = DISPLAY_ACCOUNT.id,
                 folders = persistentListOf(
                     UNIFIED_FOLDER,
                     DISPLAY_FOLDER,
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/FolderDrawer.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/FolderDrawer.kt
index 625950b56a5..57879b8b789 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/FolderDrawer.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/FolderDrawer.kt
@@ -22,7 +22,7 @@ internal data class FolderDrawerState(
 
 class FolderDrawer(
     override val parent: AppCompatActivity,
-    private val openAccount: (account: Account) -> Unit,
+    private val openAccount: (accountId: String) -> Unit,
     private val openFolder: (folderId: Long) -> Unit,
     private val openUnifiedFolder: () -> Unit,
     private val openManageFolders: () -> Unit,
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt
index 4437c0b6877..211b1456ac5 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt
@@ -17,7 +17,7 @@ internal interface DomainContract {
         }
 
         fun interface GetDisplayFoldersForAccount {
-            operator fun invoke(accountUuid: String, includeUnifiedFolders: Boolean): Flow<List<DisplayFolder>>
+            operator fun invoke(accountId: String, includeUnifiedFolders: Boolean): Flow<List<DisplayFolder>>
         }
 
         /**
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccount.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccount.kt
index a1eea409b5c..7e703c71f4d 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccount.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccount.kt
@@ -1,11 +1,10 @@
 package app.k9mail.feature.navigation.drawer.domain.entity
 
-import app.k9mail.legacy.account.Account
-
 internal data class DisplayAccount(
-    val account: Account,
+    val id: String,
+    val name: String,
+    val email: String,
+    val color: Int,
     val unreadMessageCount: Int,
     val starredMessageCount: Int,
-) {
-    val uuid: String = account.uuid
-}
+)
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccountFolder.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccountFolder.kt
index 0089861cc89..08c6c3e7c18 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccountFolder.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/entity/DisplayAccountFolder.kt
@@ -3,15 +3,15 @@ package app.k9mail.feature.navigation.drawer.domain.entity
 import app.k9mail.core.mail.folder.api.Folder
 
 internal data class DisplayAccountFolder(
-    val accountUuid: String,
+    val accountId: String,
     val folder: Folder,
     val isInTopGroup: Boolean,
     override val unreadMessageCount: Int,
     override val starredMessageCount: Int,
 ) : DisplayFolder {
-    override val id: String = createDisplayAccountFolderId(accountUuid, folder.id)
+    override val id: String = createDisplayAccountFolderId(accountId, folder.id)
 }
 
-fun createDisplayAccountFolderId(accountUuid: String, folderId: Long): String {
-    return "${accountUuid}_$folderId"
+fun createDisplayAccountFolderId(accountId: String, folderId: Long): String {
+    return "${accountId}_$folderId"
 }
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt
index f173256f3b1..805d3ca3263 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt
@@ -37,7 +37,10 @@ internal class GetDisplayAccounts(
                 combine(messageCountsFlows) { messageCountsList ->
                     messageCountsList.mapIndexed { index, messageCounts ->
                         DisplayAccount(
-                            account = accounts[index],
+                            id = accounts[index].uuid,
+                            name = accounts[index].displayName,
+                            email = accounts[index].email,
+                            color = accounts[index].chipColor,
                             unreadMessageCount = messageCounts.unread,
                             starredMessageCount = messageCounts.starred,
                         )
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayFoldersForAccount.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayFoldersForAccount.kt
index 20f3c5c40a5..0b57abe58ff 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayFoldersForAccount.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayFoldersForAccount.kt
@@ -17,11 +17,11 @@ internal class GetDisplayFoldersForAccount(
     private val repository: DisplayFolderRepository,
     private val messageCountsProvider: MessageCountsProvider,
 ) : UseCase.GetDisplayFoldersForAccount {
-    override fun invoke(accountUuid: String, includeUnifiedFolders: Boolean): Flow<List<DisplayFolder>> {
-        return repository.getDisplayFoldersFlow(accountUuid).map { displayFolders ->
+    override fun invoke(accountId: String, includeUnifiedFolders: Boolean): Flow<List<DisplayFolder>> {
+        return repository.getDisplayFoldersFlow(accountId).map { displayFolders ->
             displayFolders.map { displayFolder ->
                 DisplayAccountFolder(
-                    accountUuid = accountUuid,
+                    accountId = accountId,
                     folder = displayFolder.folder,
                     isInTopGroup = displayFolder.isInTopGroup,
                     unreadMessageCount = displayFolder.unreadMessageCount,
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt
index 0c208d49b82..0666bf41542 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContent.kt
@@ -35,7 +35,7 @@ internal fun DrawerContent(
             .fillMaxHeight()
             .testTag("DrawerContent"),
     ) {
-        val selectedAccount = state.accounts.firstOrNull { it.uuid == state.selectedAccountUuid }
+        val selectedAccount = state.accounts.firstOrNull { it.id == state.selectedAccountId }
         Column {
             selectedAccount?.let {
                 AccountView(
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt
index ecceccb3a52..f3a9023af41 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerContract.kt
@@ -5,7 +5,6 @@ import app.k9mail.core.ui.compose.common.mvi.UnidirectionalViewModel
 import app.k9mail.feature.navigation.drawer.NavigationDrawerExternalContract.DrawerConfig
 import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount
 import app.k9mail.feature.navigation.drawer.domain.entity.DisplayFolder
-import app.k9mail.legacy.account.Account
 import kotlinx.collections.immutable.ImmutableList
 import kotlinx.collections.immutable.persistentListOf
 
@@ -20,7 +19,7 @@ internal interface DrawerContract {
             showStarredCount = false,
         ),
         val accounts: ImmutableList<DisplayAccount> = persistentListOf(),
-        val selectedAccountUuid: String? = null,
+        val selectedAccountId: String? = null,
         val folders: ImmutableList<DisplayFolder> = persistentListOf(),
         val selectedFolderId: String? = null,
         val showAccountSelector: Boolean = true,
@@ -28,7 +27,7 @@ internal interface DrawerContract {
     )
 
     sealed interface Event {
-        data class SelectAccount(val accountUuid: String?) : Event
+        data class SelectAccount(val accountId: String?) : Event
         data class SelectFolder(val folderId: String?) : Event
         data class OnAccountClick(val account: DisplayAccount) : Event
         data class OnAccountViewClick(val account: DisplayAccount) : Event
@@ -41,7 +40,7 @@ internal interface DrawerContract {
     }
 
     sealed interface Effect {
-        data class OpenAccount(val account: Account) : Effect
+        data class OpenAccount(val accountId: String) : Effect
         data class OpenFolder(val folderId: Long) : Effect
         data object OpenUnifiedFolder : Effect
         data object OpenManageFolders : Effect
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt
index d620669b45f..4f223f0b7d3 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerView.kt
@@ -8,13 +8,12 @@ import app.k9mail.feature.navigation.drawer.FolderDrawerState
 import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Effect
 import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Event
 import app.k9mail.feature.navigation.drawer.ui.DrawerContract.ViewModel
-import app.k9mail.legacy.account.Account
 import org.koin.androidx.compose.koinViewModel
 
 @Composable
 internal fun DrawerView(
     drawerState: FolderDrawerState,
-    openAccount: (account: Account) -> Unit,
+    openAccount: (accountId: String) -> Unit,
     openFolder: (folderId: Long) -> Unit,
     openUnifiedFolder: () -> Unit,
     openManageFolders: () -> Unit,
@@ -24,7 +23,7 @@ internal fun DrawerView(
 ) {
     val (state, dispatch) = viewModel.observe { effect ->
         when (effect) {
-            is Effect.OpenAccount -> openAccount(effect.account)
+            is Effect.OpenAccount -> openAccount(effect.accountId)
             is Effect.OpenFolder -> openFolder(effect.folderId)
             Effect.OpenUnifiedFolder -> openUnifiedFolder()
             is Effect.OpenManageFolders -> openManageFolders()
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModel.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModel.kt
index 604efde32b2..b38e10f43d2 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModel.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModel.kt
@@ -61,13 +61,13 @@ internal class DrawerViewModel(
     }
 
     private fun updateAccounts(accounts: List<DisplayAccount>) {
-        val selectedAccount = accounts.find { it.uuid == state.value.selectedAccountUuid }
+        val selectedAccount = accounts.find { it.id == state.value.selectedAccountId }
             ?: accounts.firstOrNull()
 
         updateState {
             it.copy(
                 accounts = accounts.toImmutableList(),
-                selectedAccountUuid = selectedAccount?.uuid,
+                selectedAccountId = selectedAccount?.id,
             )
         }
     }
@@ -75,13 +75,13 @@ internal class DrawerViewModel(
     @OptIn(ExperimentalCoroutinesApi::class)
     private suspend fun loadFolders() {
         state.map {
-            it.selectedAccountUuid?.let { accountUuid ->
-                Pair(accountUuid, it.config.showUnifiedFolders)
+            it.selectedAccountId?.let { accountId ->
+                Pair(accountId, it.config.showUnifiedFolders)
             }
         }.filterNotNull()
             .distinctUntilChanged()
-            .flatMapLatest { (accountUuid, showUnifiedInbox) ->
-                getDisplayFoldersForAccount(accountUuid, showUnifiedInbox)
+            .flatMapLatest { (accountId, showUnifiedInbox) ->
+                getDisplayFoldersForAccount(accountId, showUnifiedInbox)
             }.collectLatest { folders ->
                 updateFolders(folders)
             }
@@ -102,7 +102,7 @@ internal class DrawerViewModel(
 
     override fun event(event: Event) {
         when (event) {
-            is Event.SelectAccount -> selectAccount(event.accountUuid)
+            is Event.SelectAccount -> selectAccount(event.accountId)
             is Event.SelectFolder -> selectFolder(event.folderId)
 
             is Event.OnAccountClick -> openAccount(event.account)
@@ -121,10 +121,10 @@ internal class DrawerViewModel(
         }
     }
 
-    private fun selectAccount(accountUuid: String?) {
+    private fun selectAccount(accountId: String?) {
         updateState {
             it.copy(
-                selectedAccountUuid = accountUuid,
+                selectedAccountId = accountId,
             )
         }
     }
@@ -139,7 +139,7 @@ internal class DrawerViewModel(
 
     private fun openAccount(account: DisplayAccount?) {
         if (account != null) {
-            emitEffect(Effect.OpenAccount(account.account))
+            emitEffect(Effect.OpenAccount(account.id))
         }
     }
 
@@ -168,14 +168,14 @@ internal class DrawerViewModel(
     }
 
     private fun onSyncAccount() {
-        if (state.value.isLoading || state.value.selectedAccountUuid == null) return
+        if (state.value.isLoading || state.value.selectedAccountId == null) return
 
         viewModelScope.launch {
             updateState {
                 it.copy(isLoading = true)
             }
 
-            state.value.selectedAccountUuid?.let { syncAccount(it).collect() }
+            state.value.selectedAccountId?.let { syncAccount(it).collect() }
 
             updateState {
                 it.copy(isLoading = false)
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountAvatar.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountAvatar.kt
index 3e6d2e5e5b7..c25a0bcdf18 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountAvatar.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountAvatar.kt
@@ -28,7 +28,7 @@ internal fun AccountAvatar(
     modifier: Modifier = Modifier,
 ) {
     val context = LocalContext.current
-    val accountColor = calculateAccountColor(account.account.chipColor)
+    val accountColor = calculateAccountColor(account.color)
     val accountColorRoles = accountColor.toColorRoles(context)
 
     Box(
@@ -50,7 +50,7 @@ internal fun AccountAvatar(
                     .border(2.dp, MainTheme.colors.surfaceContainerLowest, CircleShape),
             ) {
                 Placeholder(
-                    displayName = account.account.displayName,
+                    displayName = account.name,
                 )
                 // TODO: Add image loading
             }
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountList.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountList.kt
index 3e857bd66e6..188875e2dd7 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountList.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountList.kt
@@ -45,7 +45,7 @@ internal fun AccountList(
             ) {
                 items(
                     items = accounts,
-                    key = { account -> account.account.uuid },
+                    key = { account -> account.id },
                 ) { account ->
                     if (selectedAccount != null && account == selectedAccount) {
                         return@items
diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountView.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountView.kt
index 8a2342b0a32..543cf70f5b0 100644
--- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountView.kt
+++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/ui/account/AccountView.kt
@@ -65,7 +65,7 @@ internal fun AccountView(
             verticalAlignment = Alignment.CenterVertically,
         ) {
             AccountIndicator(
-                accountColor = account.account.chipColor,
+                accountColor = account.color,
                 modifier = Modifier
                     .fillMaxHeight()
                     .padding(end = MainTheme.spacings.oneHalf),
@@ -74,11 +74,11 @@ internal fun AccountView(
                 verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.half),
             ) {
                 TextBodyLarge(
-                    text = account.account.displayName,
+                    text = account.name,
                     color = MainTheme.colors.onSurface,
                 )
                 TextBodyMedium(
-                    text = account.account.email,
+                    text = account.email,
                     color = MainTheme.colors.onSurfaceVariant,
                 )
             }
diff --git a/legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
index 3e63f9b5a3f..450dd0538b1 100644
--- a/legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
+++ b/legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
@@ -593,7 +593,7 @@ open class MessageList :
     private fun initializeFolderDrawer() {
         navigationDrawer = FolderDrawer(
             parent = this,
-            openAccount = { account -> openRealAccount(account) },
+            openAccount = { accountId -> openRealAccount(accountId) },
             openFolder = { folderId -> openFolder(folderId) },
             openUnifiedFolder = { openUnifiedInbox() },
             openManageFolders = { launchManageFoldersScreen() },
@@ -666,17 +666,14 @@ open class MessageList :
         ManageFoldersActivity.launch(this, account!!)
     }
 
-    fun openRealAccount(account: Account): Boolean {
-        val shouldCloseDrawer = account.autoExpandFolderId != null
-
+    fun openRealAccount(accountId: String) {
+        val account = accountManager.getAccount(accountId) ?: return
         val folderId = defaultFolderProvider.getDefaultFolder(account)
 
         val search = LocalSearch()
         search.addAllowedFolder(folderId)
         search.addAccountUuid(account.uuid)
         actionDisplaySearch(this, search, noThreading = false, newTask = false)
-
-        return shouldCloseDrawer
     }
 
     private fun performSearch(search: LocalSearch) {


Test patch:
diff --git a/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/FakeData.kt b/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/FakeData.kt
index 7ab5cde18f6..0d5a03a44e0 100644
--- a/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/FakeData.kt
+++ b/feature/navigation/drawer/src/debug/kotlin/app/k9mail/feature/navigation/drawer/ui/FakeData.kt
@@ -1,5 +1,7 @@
 package app.k9mail.feature.navigation.drawer.ui
 
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.toArgb
 import app.k9mail.core.mail.folder.api.Folder
 import app.k9mail.core.mail.folder.api.FolderType
 import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount
@@ -35,7 +37,10 @@ internal object FakeData {
     }
 
     val DISPLAY_ACCOUNT = DisplayAccount(
-        account = ACCOUNT,
+        id = ACCOUNT_UUID,
+        name = DISPLAY_NAME,
+        email = EMAIL_ADDRESS,
+        color = Color.Red.toArgb(),
         unreadMessageCount = 0,
         starredMessageCount = 0,
     )
@@ -48,7 +53,7 @@ internal object FakeData {
     )
 
     val DISPLAY_FOLDER = DisplayAccountFolder(
-        accountUuid = ACCOUNT_UUID,
+        accountId = ACCOUNT_UUID,
         folder = FOLDER,
         isInTopGroup = false,
         unreadMessageCount = 14,
diff --git a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerStateTest.kt b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerStateTest.kt
index 14421045ecf..6197de8bd04 100644
--- a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerStateTest.kt
+++ b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerStateTest.kt
@@ -20,7 +20,7 @@ internal class DrawerStateTest {
                     showStarredCount = false,
                 ),
                 accounts = persistentListOf(),
-                selectedAccountUuid = null,
+                selectedAccountId = null,
                 folders = persistentListOf(),
                 selectedFolderId = null,
                 showAccountSelector = true,
diff --git a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewKtTest.kt b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewKtTest.kt
index 3137469ee47..2867c3786f0 100644
--- a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewKtTest.kt
+++ b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewKtTest.kt
@@ -40,7 +40,7 @@ internal class DrawerViewKtTest : ComposeTest() {
 
         assertThat(counter).isEqualTo(verifyCounter)
 
-        viewModel.effect(Effect.OpenAccount(FakeData.ACCOUNT))
+        viewModel.effect(Effect.OpenAccount(FakeData.DISPLAY_ACCOUNT.id))
 
         verifyCounter.openAccountCount++
         assertThat(counter).isEqualTo(verifyCounter)
diff --git a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModelTest.kt b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModelTest.kt
index 3e13ea534ee..f1ee11e19f2 100644
--- a/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModelTest.kt
+++ b/feature/navigation/drawer/src/test/kotlin/app/k9mail/feature/navigation/drawer/ui/DrawerViewModelTest.kt
@@ -17,8 +17,6 @@ import app.k9mail.feature.navigation.drawer.ui.DrawerContract.Effect
 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.FakeData.DISPLAY_ACCOUNT
-import app.k9mail.legacy.account.Account
-import app.k9mail.legacy.account.Identity
 import assertk.assertThat
 import assertk.assertions.isEqualTo
 import kotlin.test.Test
@@ -64,7 +62,7 @@ internal class DrawerViewModelTest {
     fun `should change loading state when OnSyncAccount event is received`() = runMviTest {
         val initialState = State(
             accounts = listOf(DISPLAY_ACCOUNT).toImmutableList(),
-            selectedAccountUuid = DISPLAY_ACCOUNT.uuid,
+            selectedAccountId = DISPLAY_ACCOUNT.id,
         )
         val testSubject = createTestSubject(
             initialState = initialState,
@@ -84,7 +82,7 @@ internal class DrawerViewModelTest {
 
     @Test
     fun `should skip loading when no account is selected and OnSyncAccount event is received`() = runMviTest {
-        val initialState = State(selectedAccountUuid = null)
+        val initialState = State(selectedAccountId = null)
         var counter = 0
         val testSubject = createTestSubject(
             initialState = initialState,
@@ -187,7 +185,7 @@ internal class DrawerViewModelTest {
 
         assertThat(testSubject.state.value.accounts.size).isEqualTo(displayAccounts.size)
         assertThat(testSubject.state.value.accounts).isEqualTo(displayAccounts)
-        assertThat(testSubject.state.value.selectedAccountUuid).isEqualTo(displayAccounts.first().uuid)
+        assertThat(testSubject.state.value.selectedAccountId).isEqualTo(displayAccounts.first().id)
     }
 
     @Test
@@ -207,7 +205,7 @@ internal class DrawerViewModelTest {
 
         assertThat(testSubject.state.value.accounts.size).isEqualTo(newDisplayAccounts.size)
         assertThat(testSubject.state.value.accounts).isEqualTo(newDisplayAccounts)
-        assertThat(testSubject.state.value.selectedAccountUuid).isEqualTo(newDisplayAccounts.first().uuid)
+        assertThat(testSubject.state.value.selectedAccountId).isEqualTo(newDisplayAccounts.first().id)
     }
 
     @Test
@@ -220,7 +218,7 @@ internal class DrawerViewModelTest {
         advanceUntilIdle()
 
         assertThat(testSubject.state.value.accounts.size).isEqualTo(0)
-        assertThat(testSubject.state.value.selectedAccountUuid).isEqualTo(null)
+        assertThat(testSubject.state.value.selectedAccountId).isEqualTo(null)
     }
 
     @Test
@@ -234,7 +232,7 @@ internal class DrawerViewModelTest {
             testSubject,
             State(
                 accounts = displayAccounts.toImmutableList(),
-                selectedAccountUuid = displayAccounts.first().uuid,
+                selectedAccountId = displayAccounts.first().id,
             ),
         )
 
@@ -245,7 +243,7 @@ internal class DrawerViewModelTest {
         advanceUntilIdle()
 
         turbines.assertThatAndEffectTurbineConsumed {
-            isEqualTo(Effect.OpenAccount(displayAccounts[1].account))
+            isEqualTo(Effect.OpenAccount(displayAccounts[1].id))
         }
     }
 
@@ -254,7 +252,7 @@ internal class DrawerViewModelTest {
         val displayAccounts = createDisplayAccountList(3)
         val getDisplayAccountsFlow = MutableStateFlow(displayAccounts)
         val displayFoldersMap = mapOf(
-            displayAccounts[0].uuid to createDisplayFolderList(3),
+            displayAccounts[0].id to createDisplayFolderList(3),
         )
         val displayFoldersFlow = MutableStateFlow(displayFoldersMap)
         val testSubject = createTestSubject(
@@ -264,7 +262,7 @@ internal class DrawerViewModelTest {
 
         advanceUntilIdle()
 
-        val displayFolders = displayFoldersMap[displayAccounts[0].uuid] ?: emptyList()
+        val displayFolders = displayFoldersMap[displayAccounts[0].id] ?: emptyList()
         assertThat(testSubject.state.value.folders.size).isEqualTo(displayFolders.size)
         assertThat(testSubject.state.value.folders).isEqualTo(displayFolders)
     }
@@ -274,9 +272,9 @@ internal class DrawerViewModelTest {
         val displayAccounts = createDisplayAccountList(3)
         val getDisplayAccountsFlow = MutableStateFlow(displayAccounts)
         val displayFoldersMap = mapOf(
-            displayAccounts[0].uuid to createDisplayFolderList(1),
-            displayAccounts[1].uuid to createDisplayFolderList(5),
-            displayAccounts[2].uuid to createDisplayFolderList(10),
+            displayAccounts[0].id to createDisplayFolderList(1),
+            displayAccounts[1].id to createDisplayFolderList(5),
+            displayAccounts[2].id to createDisplayFolderList(10),
         )
         val displayFoldersFlow = MutableStateFlow(displayFoldersMap)
         val testSubject = createTestSubject(
@@ -286,11 +284,11 @@ internal class DrawerViewModelTest {
 
         advanceUntilIdle()
 
-        testSubject.event(Event.SelectAccount(displayAccounts[1].uuid))
+        testSubject.event(Event.SelectAccount(displayAccounts[1].id))
 
         advanceUntilIdle()
 
-        val displayFolders = displayFoldersMap[displayAccounts[1].account.uuid] ?: emptyList()
+        val displayFolders = displayFoldersMap[displayAccounts[1].id] ?: emptyList()
         assertThat(testSubject.state.value.folders.size).isEqualTo(displayFolders.size)
         assertThat(testSubject.state.value.folders).isEqualTo(displayFolders)
     }
@@ -300,14 +298,14 @@ internal class DrawerViewModelTest {
         val displayAccounts = createDisplayAccountList(3)
         val getDisplayAccountsFlow = MutableStateFlow(displayAccounts)
         val displayFoldersMap = mapOf(
-            displayAccounts[0].account.uuid to createDisplayFolderList(3),
+            displayAccounts[0].id to createDisplayFolderList(3),
         )
         val displayFoldersFlow = MutableStateFlow(displayFoldersMap)
         val initialState = State(
             accounts = displayAccounts.toImmutableList(),
-            selectedAccountUuid = displayAccounts[0].uuid,
-            folders = displayFoldersMap[displayAccounts[0].account.uuid]!!.toImmutableList(),
-            selectedFolderId = displayFoldersMap[displayAccounts[0].account.uuid]!![0].id,
+            selectedAccountId = displayAccounts[0].id,
+            folders = displayFoldersMap[displayAccounts[0].id]!!.toImmutableList(),
+            selectedFolderId = displayFoldersMap[displayAccounts[0].id]!![0].id,
         )
         val testSubject = createTestSubject(
             displayAccountsFlow = getDisplayAccountsFlow,
@@ -317,7 +315,7 @@ internal class DrawerViewModelTest {
 
         advanceUntilIdle()
 
-        val displayFolders = displayFoldersMap[displayAccounts[0].account.uuid] ?: emptyList()
+        val displayFolders = displayFoldersMap[displayAccounts[0].id] ?: emptyList()
         testSubject.event(Event.OnFolderClick(displayFolders[1]))
 
         assertThat(turbines.awaitEffectItem()).isEqualTo(Effect.OpenFolder(displayFolders[1].folder.id))
@@ -333,15 +331,15 @@ internal class DrawerViewModelTest {
             val displayAccounts = createDisplayAccountList(1)
             val getDisplayAccountsFlow = MutableStateFlow(displayAccounts)
             val displayFoldersMap = mapOf(
-                displayAccounts[0].account.uuid to
+                displayAccounts[0].id to
                     createDisplayFolderList(1) + listOf(createDisplayUnifiedFolder()),
             )
             val displayFoldersFlow = MutableStateFlow(displayFoldersMap)
             val initialState = State(
                 accounts = displayAccounts.toImmutableList(),
-                selectedAccountUuid = displayAccounts[0].account.uuid,
-                folders = displayFoldersMap[displayAccounts[0].account.uuid]!!.toImmutableList(),
-                selectedFolderId = displayFoldersMap[displayAccounts[0].account.uuid]!![0].id,
+                selectedAccountId = displayAccounts[0].id,
+                folders = displayFoldersMap[displayAccounts[0].id]!!.toImmutableList(),
+                selectedFolderId = displayFoldersMap[displayAccounts[0].id]!![0].id,
             )
             val testSubject = createTestSubject(
                 displayAccountsFlow = getDisplayAccountsFlow,
@@ -351,7 +349,7 @@ internal class DrawerViewModelTest {
 
             advanceUntilIdle()
 
-            val displayFolders = displayFoldersMap[displayAccounts[0].account.uuid] ?: emptyList()
+            val displayFolders = displayFoldersMap[displayAccounts[0].id] ?: emptyList()
             testSubject.event(Event.OnFolderClick(displayFolders[1]))
 
             assertThat(turbines.awaitEffectItem()).isEqualTo(Effect.OpenUnifiedFolder)
@@ -411,8 +409,8 @@ internal class DrawerViewModelTest {
             initialState = initialState,
             getDrawerConfig = { drawerConfigFlow },
             getDisplayAccounts = { displayAccountsFlow },
-            getDisplayFoldersForAccount = { accountUuid, _ ->
-                displayFoldersFlow.map { it[accountUuid] ?: emptyList() }
+            getDisplayFoldersForAccount = { accountid, _ ->
+                displayFoldersFlow.map { it[accountid] ?: emptyList() }
             },
             syncAccount = { syncAccountFlow },
             syncAllAccounts = { syncAllAccounts },
@@ -430,30 +428,17 @@ internal class DrawerViewModelTest {
     }
 
     private fun createDisplayAccount(
-        uuid: String = "uuid",
+        id: String = "uuid",
         name: String = "name",
         email: String = "test@example.com",
         unreadCount: Int = 0,
         starredCount: Int = 0,
     ): DisplayAccount {
-        val account = Account(
-            uuid = uuid,
-        ).also {
-            it.identities = ArrayList()
-
-            val identity = Identity(
-                signatureUse = false,
-                signature = "",
-                description = "",
-            )
-            it.identities.add(identity)
-
-            it.name = name
-            it.email = email
-        }
-
         return DisplayAccount(
-            account = account,
+            id = id,
+            name = name,
+            email = email,
+            color = 0,
             unreadMessageCount = unreadCount,
             starredMessageCount = starredCount,
         )
@@ -462,13 +447,13 @@ internal class DrawerViewModelTest {
     private fun createDisplayAccountList(count: Int): List<DisplayAccount> {
         return List(count) { index ->
             createDisplayAccount(
-                uuid = "uuid-$index",
+                id = "uuid-$index",
             )
         }
     }
 
     private fun createDisplayFolder(
-        accountUuid: String = "uuid",
+        accountId: String = "uuid",
         id: Long = 1234,
         name: String = "name",
         type: FolderType = FolderType.REGULAR,
@@ -483,7 +468,7 @@ internal class DrawerViewModelTest {
         )
 
         return DisplayAccountFolder(
-            accountUuid = accountUuid,
+            accountId = accountId,
             folder = folder,
             isInTopGroup = false,
             unreadMessageCount = unreadCount,