3.0.31

Improvements

  • [Notifications]: Improved loading state for API calls, now returns null until data is fully loaded.

3.0.30

New Features

  • [Notifications]: Added API to get unread notifications count.
    • Sample response:
    { 
      forYou: 4, // # of unread notifications in the "For You" tab
      all: 5     // # of unread notifications in the "All" or "Document" tab
    }
    

Using Hooks:

const unreadCount = useUnreadNotificationsCount();

useEffect(() => {
  console.log('Unread Count', unreadCount);
}, [unreadCount]);

Using API:

const notificationElement = client.getNotificationElement();
notificationElement.getUnreadNotificationsCount().subscribe((data) => {
  console.log('Unread notifications count:', data);
});

Improvements

  • [Comments]: Improved search functionality in @mentions to support spaces in search queries.