지금 라이브 중 전체보기 - 당겨서 새로고침이 되지 않던 버그 수정
This commit is contained in:
		| @@ -294,6 +294,7 @@ final class LiveViewModel: ObservableObject { | |||||||
|                     ERROR_LOG(error.localizedDescription) |                     ERROR_LOG(error.localizedDescription) | ||||||
|                 } |                 } | ||||||
|             } receiveValue: { [unowned self] response in |             } receiveValue: { [unowned self] response in | ||||||
|  |                 self.isRefresh = false | ||||||
|                 self.isLoading = false |                 self.isLoading = false | ||||||
|                 let responseData = response.data |                 let responseData = response.data | ||||||
|                  |                  | ||||||
| @@ -302,6 +303,10 @@ final class LiveViewModel: ObservableObject { | |||||||
|                     let decoded = try jsonDecoder.decode(ApiResponse<[GetRoomListResponse]>.self, from: responseData) |                     let decoded = try jsonDecoder.decode(ApiResponse<[GetRoomListResponse]>.self, from: responseData) | ||||||
|                      |                      | ||||||
|                     if let data = decoded.data, decoded.success { |                     if let data = decoded.data, decoded.success { | ||||||
|  |                         if page < 2 { | ||||||
|  |                             self.liveNowItems.removeAll() | ||||||
|  |                         } | ||||||
|  |                          | ||||||
|                         if !data.isEmpty { |                         if !data.isEmpty { | ||||||
|                             page += 1 |                             page += 1 | ||||||
|                             self.liveNowItems.append(contentsOf: data) |                             self.liveNowItems.append(contentsOf: data) | ||||||
|   | |||||||
| @@ -24,6 +24,8 @@ struct LiveNowAllView: View { | |||||||
|                     RefreshableScrollView( |                     RefreshableScrollView( | ||||||
|                         refreshing: $viewModel.isRefresh, |                         refreshing: $viewModel.isRefresh, | ||||||
|                         action: { |                         action: { | ||||||
|  |                             viewModel.page = 1 | ||||||
|  |                             viewModel.isLast = false | ||||||
|                             viewModel.getLiveNowList() |                             viewModel.getLiveNowList() | ||||||
|                         }, |                         }, | ||||||
|                         content: { |                         content: { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung