mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	feat: refactor friends requests
This commit is contained in:
		
							parent
							
								
									b3f87d5662
								
							
						
					
					
						commit
						ef0699dbea
					
				
					 11 changed files with 74 additions and 34 deletions
				
			
		| 
						 | 
				
			
			@ -9,6 +9,7 @@ import type {
 | 
			
		|||
  AppUpdaterEvent,
 | 
			
		||||
  StartGameDownloadPayload,
 | 
			
		||||
  GameRunning,
 | 
			
		||||
  FriendRequestAction,
 | 
			
		||||
} from "@types";
 | 
			
		||||
 | 
			
		||||
contextBridge.exposeInMainWorld("electron", {
 | 
			
		||||
| 
						 | 
				
			
			@ -137,6 +138,8 @@ contextBridge.exposeInMainWorld("electron", {
 | 
			
		|||
  updateProfile: (displayName: string, newProfileImagePath: string | null) =>
 | 
			
		||||
    ipcRenderer.invoke("updateProfile", displayName, newProfileImagePath),
 | 
			
		||||
  getFriendRequests: () => ipcRenderer.invoke("getFriendRequests"),
 | 
			
		||||
  updateFriendRequest: (userId: string, action: FriendRequestAction) =>
 | 
			
		||||
    ipcRenderer.invoke("updateFriendRequest", userId, action),
 | 
			
		||||
 | 
			
		||||
  /* User */
 | 
			
		||||
  getUser: (userId: string) => ipcRenderer.invoke("getUser", userId),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue