scheduled_messages: Add left sidebar count.

This commit introduces logic to present a message count with the
Scheduled messages item in the left sidebar.

The count is present on the initial load, and is updated as a user
adds or removes scheduled messages.
This commit is contained in:
Karl Stolley
2023-05-02 14:08:15 -05:00
committed by Tim Abbott
parent 6dc10f8696
commit 2d9cbfa8f1
5 changed files with 22 additions and 0 deletions

View File

@@ -140,6 +140,10 @@ export function delete_scheduled_message(scheduled_msg_id, success = () => {}) {
});
}
export function get_count() {
return scheduled_messages_data.length;
}
export function initialize(scheduled_messages_params) {
scheduled_messages_data = scheduled_messages_params.scheduled_messages;