Skip to content

Show counts in main menu and nav bar #1088

Open
@PIG208

Description

@PIG208

The design for the main menu and bottom nav bar (#1035) calls for showing message counts on many of the items: the number of unread DMs on the DMs item, the number of starred messages on the "Starred messages" item, and so on. This issue is for adding that feature.

Screenshot 00-menu iphone 14 pro

Implementation

The exact semantics of whether a given item has a number shown on it, and what that number should be, should match the web app's left sidebar.

For computing the values to be shown: generally we should avoid doing significant computation in the widgets' build methods. Instead, use the Unreads model, or potentially introduce a view-model for efficiently maintaining whatever additional information we might need for some of these items.

For how to organize this feature in the widgets code:

Maybe a good structure for that is a method like Widget? buildTrailing(BuildContext context) [on the _MenuButton class in lib/widgets/home.dart]. Then most subclasses will return a _MenuItemCounter, or null; but e.g. the "Notifications" row (in the future! […]) can return that yellow warning icon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-homeThe home screens of the app; finding and starting conversationsa-modelImplementing our data model (PerAccountStore, etc.)

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions