Skip to content
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

Simplify ConversationOverview code for sections #260

Open
FelberMartin opened this issue Dec 30, 2024 · 0 comments
Open

Simplify ConversationOverview code for sections #260

FelberMartin opened this issue Dec 30, 2024 · 0 comments
Labels
blocked This issue is blocked by another issue. Please mention the blocking issue chore House keeping; non-functional, non-visual changes

Comments

@FelberMartin
Copy link
Collaborator

Problem

The code for section handling in the ConversationOverview and ConversationList is currently quite messy. There is no central place that defines a section and its properties, instead we have different variables and methods all over the place:

  • UI
    • Keys for each section in ConversationList
    • Key suffixes in ConversationList
    • A separate method for toggling each section in the ConversationOverviewViewModel
  • Other
    • A variable for most of the sections in ConversationCollections
    • ConversationPreferenceService.Preferences with again one variable for each section
    • Keys for storing the preferences in ConversationPreferenceStorageServiceImpl

This issue is not strictly blocked, but I suggest to wait until #259 is merged.

Suggested changes

  • At a central place, create a data model for a section, containing all necassary variables:
    • Key for UI and Storage
    • Key suffixes for the conversations listed in this section
    • ... (Whatever else is needed)
  • This new model may also replace the need for ConversationCollections and allow for cleaner code in places this is currently used
@FelberMartin FelberMartin added chore House keeping; non-functional, non-visual changes blocked This issue is blocked by another issue. Please mention the blocking issue labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue is blocked by another issue. Please mention the blocking issue chore House keeping; non-functional, non-visual changes
Projects
None yet
Development

No branches or pull requests

1 participant