라이브
- 공유하기 버튼 제거
This commit is contained in:
		| @@ -814,50 +814,6 @@ final class LiveRoomViewModel: NSObject, ObservableObject { | ||||
|             .store(in: &subscription) | ||||
|     } | ||||
|      | ||||
|     func shareRoom() { | ||||
|         guard let link = URL(string: "https://sodalive.net/?room_id=\(AppState.shared.roomId)") else { return } | ||||
|         let dynamicLinksDomainURIPrefix = "https://sodalive.page.link" | ||||
|         guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else { | ||||
|             self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." | ||||
|             self.isShowErrorPopup = true | ||||
|             return | ||||
|         } | ||||
|          | ||||
|         linkBuilder.iOSParameters = DynamicLinkIOSParameters(bundleID: "kr.co.vividnext.sodalive") | ||||
|         linkBuilder.iOSParameters?.appStoreID = "6461721697" | ||||
|          | ||||
|         linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "kr.co.vividnext.sodalive") | ||||
|          | ||||
|         guard let longDynamicLink = linkBuilder.url else { | ||||
|             self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." | ||||
|             self.isShowErrorPopup = true | ||||
|             return | ||||
|         } | ||||
|         DEBUG_LOG("The long URL is: \(longDynamicLink)") | ||||
|          | ||||
|         DynamicLinkComponents.shortenURL(longDynamicLink, options: nil) { [unowned self] url, warnings, error in | ||||
|             let shortUrl = url?.absoluteString | ||||
|              | ||||
|             if let liveRoomInfo = self.liveRoomInfo { | ||||
|                 let urlString = shortUrl != nil ? shortUrl! : longDynamicLink.absoluteString | ||||
|                 if liveRoomInfo.isPrivateRoom { | ||||
|                     shareMessage = "\(UserDefaults.string(forKey: .nickname))님이 귀하를 소다라이브 비공개라이브에 초대하였습니다.\n" + | ||||
|                     "※ 라이브 참여: \(urlString)\n" + | ||||
|                     "(입장 비밀번호: \(liveRoomInfo.password!))" | ||||
|                 } else { | ||||
|                     shareMessage = "\(UserDefaults.string(forKey: .nickname))님이 귀하를 소다라이브 공개라이브에 초대하였습니다.\n" + | ||||
|                     "※ 라이브 참여: \(urlString)" | ||||
|                 } | ||||
|                  | ||||
|                 isShowShareView = true | ||||
|             } else { | ||||
|                 self.errorMessage = "공유링크를 생성하지 못했습니다.\n다시 시도해 주세요." | ||||
|                 self.isShowErrorPopup = true | ||||
|                 return | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     func kickOut() { | ||||
|         repository.kickOut(roomId: AppState.shared.roomId, userId: kickOutId) | ||||
|             .sink { result in | ||||
|   | ||||
| @@ -30,7 +30,6 @@ struct LiveRoomInfoGuestView: View { | ||||
|      | ||||
|     let onClickQuit: () -> Void | ||||
|     let onClickToggleBg: () -> Void | ||||
|     let onClickShare: () -> Void | ||||
|     let onClickFollow: (Bool) -> Void | ||||
|     let onClickProfile: (Int) -> Void | ||||
|     let onClickNotice: () -> Void | ||||
| @@ -86,13 +85,6 @@ struct LiveRoomInfoGuestView: View { | ||||
|                         strokeWidth: 1, | ||||
|                         strokeCornerRadius: 5.3 | ||||
|                     ) { onClickToggleBg() } | ||||
|                      | ||||
|                     LiveRoomOverlayStrokeImageButton( | ||||
|                         imageName: "ic_share", | ||||
|                         strokeColor: Color.graybb, | ||||
|                         strokeWidth: 1, | ||||
|                         strokeCornerRadius: 5.3 | ||||
|                     ) { onClickShare() } | ||||
|                 } | ||||
|                  | ||||
|                 HStack(spacing: 8) { | ||||
| @@ -226,7 +218,6 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider { | ||||
|             isAdult: false, | ||||
|             onClickQuit: {}, | ||||
|             onClickToggleBg: {}, | ||||
|             onClickShare: {}, | ||||
|             onClickFollow: { _ in }, | ||||
|             onClickProfile: { _ in }, | ||||
|             onClickNotice: {}, | ||||
|   | ||||
| @@ -31,7 +31,6 @@ struct LiveRoomInfoHostView: View { | ||||
|      | ||||
|     let onClickQuit: () -> Void | ||||
|     let onClickToggleBg: () -> Void | ||||
|     let onClickShare: () -> Void | ||||
|     let onClickEdit: () -> Void | ||||
|     let onClickProfile: (Int) -> Void | ||||
|     let onClickNotice: () -> Void | ||||
| @@ -78,13 +77,6 @@ struct LiveRoomInfoHostView: View { | ||||
|                         strokeCornerRadius: 5.3 | ||||
|                     ) { onClickToggleBg() } | ||||
|                      | ||||
|                     LiveRoomOverlayStrokeImageButton( | ||||
|                         imageName: "ic_share", | ||||
|                         strokeColor: Color.graybb, | ||||
|                         strokeWidth: 1, | ||||
|                         strokeCornerRadius: 5.3 | ||||
|                     ) { onClickShare() } | ||||
|                      | ||||
|                     LiveRoomOverlayStrokeImageButton( | ||||
|                         imageName: "ic_edit", | ||||
|                         strokeColor: Color.graybb, | ||||
| @@ -241,7 +233,6 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider { | ||||
|             isAdult: false, | ||||
|             onClickQuit: {}, | ||||
|             onClickToggleBg: {}, | ||||
|             onClickShare: {}, | ||||
|             onClickEdit: {}, | ||||
|             onClickProfile: { _ in }, | ||||
|             onClickNotice: {}, | ||||
|   | ||||
| @@ -45,9 +45,6 @@ struct LiveRoomViewV2: View { | ||||
|                             onClickToggleBg: { | ||||
|                                 viewModel.isBgOn.toggle() | ||||
|                             }, | ||||
|                             onClickShare: { | ||||
|                                 viewModel.shareRoom() | ||||
|                             }, | ||||
|                             onClickEdit: { | ||||
|                                 viewModel.isShowEditRoomInfoDialog = true | ||||
|                             }, | ||||
| @@ -95,9 +92,6 @@ struct LiveRoomViewV2: View { | ||||
|                             onClickToggleBg: { | ||||
|                                 viewModel.isBgOn.toggle() | ||||
|                             }, | ||||
|                             onClickShare: { | ||||
|                                 viewModel.shareRoom() | ||||
|                             }, | ||||
|                             onClickFollow: { | ||||
|                                 if $0 { | ||||
|                                     viewModel.creatorUnFollow() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung