feat: friend request notification adjustments

This commit is contained in:
Zamitto
2025-03-10 19:50:53 -03:00
parent b344a1850a
commit 85efc23c25
7 changed files with 45 additions and 12 deletions

View File

@@ -16,13 +16,15 @@ const syncFriendRequests = async (_event: Electron.IpcMainInvokeEvent) => {
return HydraApi.get<FriendRequestSync>(`/profile/friend-requests/sync`)
.then((res) => {
if (
syncState.friendsRequest &&
syncState.friendsRequest != null &&
syncState.friendsRequest < res.friendRequestCount
) {
publishNewFriendRequestNotification();
}
syncState.friendsRequest = res.friendRequestCount;
return res;
})
.catch((err) => {
if (err instanceof UserNotLoggedInError) {