라이브, 콘텐츠, 채널 공유하기
- 파라미터 키, 값 각각 인코딩 적용
This commit is contained in:
		@@ -398,17 +398,27 @@ final class UserProfileViewModel: ObservableObject {
 | 
			
		||||
            .store(in: &subscription)
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    func shareChannel(userId: Int, nickname: String, profileImage: String) {        
 | 
			
		||||
        let shareUrl = "https://voiceon.onelink.me/RkTm?" +
 | 
			
		||||
        "af_dp=voiceon://" +
 | 
			
		||||
        "&deep_link_value=channel" +
 | 
			
		||||
        "&deep_link_sub5=\(userId)" +
 | 
			
		||||
        "&af_og_title=보이스온" +
 | 
			
		||||
        "&af_og_description=보이스온 \(nickname)님의 채널입니다." +
 | 
			
		||||
        "&af_og_image=\(profileImage)"
 | 
			
		||||
    func shareChannel(userId: Int, nickname: String, profileImage: String) {
 | 
			
		||||
        isLoading = true
 | 
			
		||||
        
 | 
			
		||||
        self.shareMessage = "보이스온 \(nickname)님의 채널입니다.\n\(shareUrl)"
 | 
			
		||||
        self.isShowShareView = true
 | 
			
		||||
        let params = [
 | 
			
		||||
            "af_dp": "voiceon://",
 | 
			
		||||
            "deep_link_value": "channel",
 | 
			
		||||
            "deep_link_sub5": "\(userId)",
 | 
			
		||||
            "af_og_title": "보이스온",
 | 
			
		||||
            "af_og_description": "보이스온 \(nickname)님의 채널입니다.",
 | 
			
		||||
            "af_og_image": profileImage
 | 
			
		||||
        ]
 | 
			
		||||
        
 | 
			
		||||
        if let shareUrl = createOneLinkUrlWithURLComponents(params: params) {
 | 
			
		||||
            self.shareMessage = "보이스온 \(nickname)님의 채널입니다.\n\(shareUrl)"
 | 
			
		||||
            self.isShowShareView = true
 | 
			
		||||
        } else {
 | 
			
		||||
            self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요."
 | 
			
		||||
            self.isShowPopup = true
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        self.isLoading = false
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    func userBlock(userId: Int) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user