HongshanLi / Interpolate-

0 stars 1 forks source link

Notification button need to press for twice #9

Open gaoliyao opened 5 years ago

HongshanLi commented 5 years ago

This is because when you click on the notification button, you will trigger the getActivityType() function, which sends an http request to the backend to fetch the activities. The response of this call should be a javascript object containing information of the activities. This is an asynchronous operation, and it will take a while to complete. So you cannot see the activities at once.

One possible solution is to call getActivityType() in header.service.ts automatically when the user gets into a group (or other entity), so that the activities are cached in the brower. When user clicked on the notification button, the activities can be displayed immediated