Skip to content

[ML 0.5/MVI.02.2] Define and Implement UpdateMessageFlags UseCase (Flow-based) #10510

@rafaeltonholo

Description

@rafaeltonholo

Description

Implement the UpdateMessageFlags use case to handle changing message states (e.g., Flag.SEEN, Flag.DELETED).

Goal

Standardize flag updates using a reactive Flow that emits the result of local updates and remote synchronization status.

Acceptance Criteria

  • The use case returns a Flow<Outcome<UpdateMessageFlags.Success, UpdateMessageFlags.Error>>.
  • Updates the MessageStore via MessageRepository.
  • Enqueues the appropriate flag synchronization command to the Backend, if needed.
  • Testing: Unit tests using Fakes to verify that local state is updated and the correct backend sync call is initiated.

Technical Details

  • The flow should emit as soon as the local update is successful and potentially again when the backend command is enqueued (if needed).

Metadata

Metadata

Assignees

Labels

tb-teamTasks and features handled by project maintainerstype: enhancementNew features or improvements to existing features.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions