Description
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.
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
Labels
Type
Projects
Status