라이브 룰렛
- 룰렛 설정 아이콘 추가 - 룰렛 돌리기 아이콘 추가
This commit is contained in:
		
							
								
								
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| { | ||||
|   "images" : [ | ||||
|     { | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "1x" | ||||
|     }, | ||||
|     { | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "2x" | ||||
|     }, | ||||
|     { | ||||
|       "filename" : "ic_roulette.png", | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "3x" | ||||
|     } | ||||
|   ], | ||||
|   "info" : { | ||||
|     "author" : "xcode", | ||||
|     "version" : 1 | ||||
|   } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/ic_roulette.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette.imageset/ic_roulette.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 4.8 KiB | 
							
								
								
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| { | ||||
|   "images" : [ | ||||
|     { | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "1x" | ||||
|     }, | ||||
|     { | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "2x" | ||||
|     }, | ||||
|     { | ||||
|       "filename" : "ic_roulette_settings.png", | ||||
|       "idiom" : "universal", | ||||
|       "scale" : "3x" | ||||
|     } | ||||
|   ], | ||||
|   "info" : { | ||||
|     "author" : "xcode", | ||||
|     "version" : 1 | ||||
|   } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/ic_roulette_settings.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_roulette_settings.imageset/ic_roulette_settings.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 5.5 KiB | 
| @@ -24,6 +24,7 @@ struct GetRoomInfoResponse: Decodable { | ||||
|     let listenerList: [LiveRoomMember] | ||||
|     let managerList: [LiveRoomMember] | ||||
|     let donationRankingTop3UserIds: [Int] | ||||
|     let isActiveRoulette: Bool | ||||
|     let isPrivateRoom: Bool | ||||
|     let password: String? | ||||
| } | ||||
|   | ||||
| @@ -307,6 +307,26 @@ struct LiveRoomView: View { | ||||
|                             } | ||||
|                              | ||||
|                             VStack(spacing: 13.3) { | ||||
|                                 if let liveRoomInfo = viewModel.liveRoomInfo { | ||||
|                                     if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) { | ||||
|                                         Image("ic_roulette_settings") | ||||
|                                             .resizable() | ||||
|                                             .frame(width: 26.7, height: 26.7) | ||||
|                                             .padding(11) | ||||
|                                             .background(Color(hex: "525252").opacity(0.6)) | ||||
|                                             .cornerRadius(10) | ||||
|                                             .padding(.bottom, 13.3) | ||||
|                                     } else if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) && viewModel.isActiveRoulette { | ||||
|                                         Image("ic_roulette") | ||||
|                                             .resizable() | ||||
|                                             .frame(width: 26.7, height: 26.7) | ||||
|                                             .padding(11) | ||||
|                                             .background(Color(hex: "525252").opacity(0.6)) | ||||
|                                             .cornerRadius(10) | ||||
|                                             .padding(.bottom, 13.3) | ||||
|                                     } | ||||
|                                 } | ||||
|                                  | ||||
|                                 if viewModel.role == .SPEAKER { | ||||
|                                     Image(viewModel.isMute ? "ic_mic_off" : "ic_mic_on") | ||||
|                                         .resizable() | ||||
|   | ||||
| @@ -132,6 +132,8 @@ final class LiveRoomViewModel: NSObject, ObservableObject { | ||||
|     @Published var isNoChatting = false | ||||
|     @Published var remainingNoChattingTime = 0 | ||||
|      | ||||
|     @Published var isActiveRoulette = false | ||||
|      | ||||
|     var timer: DispatchSourceTimer? | ||||
|      | ||||
|     func setOriginOffset(_ offset: CGFloat) { | ||||
| @@ -243,6 +245,7 @@ final class LiveRoomViewModel: NSObject, ObservableObject { | ||||
|                      | ||||
|                     if let data = decoded.data, decoded.success { | ||||
|                         self.liveRoomInfo = data | ||||
|                         self.isActiveRoulette = data.isActiveRoulette | ||||
|                         self.isLoading = true | ||||
|                         self.agora.joinChannel( | ||||
|                             roomInfo: data, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung