Fix reload issues in Notifications

This commit is contained in:
Lim Chee Aun 2023-05-07 19:17:16 +08:00
parent dd5b374b53
commit 2ee38f43d2
2 changed files with 7 additions and 2 deletions

View file

@ -49,7 +49,7 @@ const contentText = {
'favourite+reblog': 'boosted & favourited your post.', 'favourite+reblog': 'boosted & favourited your post.',
}; };
function Notification({ notification, instance }) { function Notification({ notification, instance, reload }) {
const { id, status, account, _accounts } = notification; const { id, status, account, _accounts } = notification;
let { type } = notification; let { type } = notification;
@ -137,7 +137,7 @@ function Notification({ notification, instance }) {
<FollowRequestButtons <FollowRequestButtons
accountID={account.id} accountID={account.id}
onChange={() => { onChange={() => {
loadNotifications(true); reload();
}} }}
/> />
)} )}

View file

@ -285,6 +285,7 @@ function Notifications() {
accountID={account.id} accountID={account.id}
onChange={() => { onChange={() => {
loadFollowRequests(); loadFollowRequests();
loadNotifications(true);
}} }}
/> />
</li> </li>
@ -337,6 +338,10 @@ function Notifications() {
instance={instance} instance={instance}
notification={notification} notification={notification}
key={notification.id} key={notification.id}
reload={() => {
loadNotifications(true);
loadFollowRequests();
}}
/> />
</> </>
); );