@@ -12,25 +12,25 @@ import Combine
1212import AtomicXCore
1313import Kingfisher
1414
15- protocol ParticipantListViewDelegate : AnyObject {
15+ public protocol ParticipantListViewDelegate : AnyObject {
1616 func muteAllAudioButtonTapped( disable: Bool )
1717 func muteAllVideoButtonTapped( disable: Bool )
1818 func participantTapped( view: ParticipantListView , participant: RoomParticipant )
1919}
2020
2121// MARK: - ParticipantListView
22- class ParticipantListView : UIView , BasePanel , PanelHeightProvider {
22+ public class ParticipantListView : UIView , BasePanel , PanelHeightProvider {
2323
2424 // MARK: - BasePanel Properties
25- weak var parentView : UIView ?
26- var backgroundMaskView : PanelMaskView ?
25+ weak public var parentView : UIView ?
26+ public var backgroundMaskView : PanelMaskView ?
2727
2828 // MARK: - PanelHeightProvider
29- var panelHeight : CGFloat {
29+ public var panelHeight : CGFloat {
3030 return UIScreen . main. bounds. height * 0.8
3131 }
3232
33- weak var delegate : ParticipantListViewDelegate ?
33+ public weak var delegate : ParticipantListViewDelegate ?
3434
3535 // MARK: - Properties
3636
@@ -109,19 +109,8 @@ class ParticipantListView: UIView, BasePanel, PanelHeightProvider {
109109 return button
110110 } ( )
111111
112- // private lazy var moreButton: UIButton = {
113- // let button = UIButton(type: .custom)
114- // button.setTitle(.more, for: .normal)
115- // button.setTitleColor(RoomColors.g6, for: .normal)
116- // button.titleLabel?.font = RoomFonts.pingFangSCFont(size: 14, weight: .regular)
117- // button.backgroundColor = RoomColors.g3
118- // button.layer.cornerRadius = 6
119- // button.isHidden = true
120- // return button
121- // }()
122-
123112 // MARK: - Initialization
124- init ( roomID: String ) {
113+ public init ( roomID: String ) {
125114 self . roomID = roomID
126115 super. init ( frame: . zero)
127116 setupViews ( )
@@ -145,7 +134,6 @@ class ParticipantListView: UIView, BasePanel, PanelHeightProvider {
145134
146135 bottomBarView. addSubview ( muteAllAudioButton)
147136 bottomBarView. addSubview ( muteAllVideoButton)
148- // bottomBarView.addSubview(moreButton)
149137 }
150138
151139 func setupConstraints( ) {
@@ -182,13 +170,6 @@ class ParticipantListView: UIView, BasePanel, PanelHeightProvider {
182170 make. width. equalTo ( muteAllAudioButton)
183171 make. height. equalTo ( 40 )
184172 }
185- //
186- // moreButton.snp.makeConstraints { make in
187- // make.centerY.equalTo(muteAllAudioButton)
188- // make.right.equalToSuperview().offset(-RoomSpacing.large)
189- // make.width.equalTo(muteAllAudioButton)
190- // make.height.equalTo(40)
191- // }
192173
193174 tableView. snp. makeConstraints { make in
194175 make. top. equalTo ( titleLabel. snp. bottom) . offset ( RoomSpacing . medium)
@@ -206,7 +187,6 @@ class ParticipantListView: UIView, BasePanel, PanelHeightProvider {
206187 dropButton. addTarget ( self , action: #selector( dropButtonTapped) , for: . touchUpInside)
207188 muteAllAudioButton. addTarget ( self , action: #selector( muteAllAudioButtonTapped) , for: . touchUpInside)
208189 muteAllVideoButton. addTarget ( self , action: #selector( muteAllVideoButtonTapped) , for: . touchUpInside)
209- // moreButton.addTarget(self, action: #selector(moreButtonTapped), for: .touchUpInside)
210190
211191 participantStore. state
212192 . subscribe ( StatePublisherSelector ( keyPath: \. participantList) )
@@ -238,14 +218,12 @@ class ParticipantListView: UIView, BasePanel, PanelHeightProvider {
238218 if let currentRoom = currentRoom {
239219 muteAllAudioButton. isHidden = false
240220 muteAllVideoButton. isHidden = false
241- // moreButton.isHidden = false
242221
243222 muteAllAudioButton. isSelected = currentRoom. isAllMicrophoneDisabled
244223 muteAllVideoButton. isSelected = currentRoom. isAllCameraDisabled
245224 } else {
246225 muteAllAudioButton. isHidden = true
247226 muteAllVideoButton. isHidden = true
248- // moreButton.isHidden = true
249227 }
250228 }
251229 . store ( in: & cancellableSet)
@@ -278,20 +256,15 @@ extension ParticipantListView {
278256 @objc private func muteAllVideoButtonTapped( sender: UIButton ) {
279257 delegate? . muteAllVideoButtonTapped ( disable: !sender. isSelected)
280258 }
281-
282- @objc private func moreButtonTapped( ) {
283- // TODO: Handle more action
284- print ( " More button tapped " )
285- }
286259}
287260
288261// MARK: - UITableViewDataSource
289262extension ParticipantListView : UITableViewDataSource {
290- func tableView( _ tableView: UITableView , numberOfRowsInSection section: Int ) -> Int {
263+ public func tableView( _ tableView: UITableView , numberOfRowsInSection section: Int ) -> Int {
291264 return allParticipants . count
292265 }
293266
294- func tableView( _ tableView: UITableView , cellForRowAt indexPath: IndexPath ) -> UITableViewCell {
267+ public func tableView( _ tableView: UITableView , cellForRowAt indexPath: IndexPath ) -> UITableViewCell {
295268 guard let cell = tableView. dequeueReusableCell ( withIdentifier: ParticipantListCell . reuseIdentifier, for: indexPath) as? ParticipantListCell else {
296269 return UITableViewCell ( )
297270 }
@@ -305,11 +278,11 @@ extension ParticipantListView: UITableViewDataSource {
305278
306279// MARK: - UITableViewDelegate
307280extension ParticipantListView : UITableViewDelegate {
308- func tableView( _ tableView: UITableView , heightForRowAt indexPath: IndexPath ) -> CGFloat {
281+ public func tableView( _ tableView: UITableView , heightForRowAt indexPath: IndexPath ) -> CGFloat {
309282 return 60
310283 }
311284
312- func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
285+ public func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
313286 let participant = allParticipants [ indexPath. row]
314287 guard canInteractWith ( participant: participant) else {
315288 return
0 commit comments