This commit is contained in:
启星
2025-08-08 10:49:36 +08:00
parent 6400cf78bb
commit b5ce3d580a
8780 changed files with 978183 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
//
// PopUpViewModel.swift
// TUIRoomKit
//
// Created by janejntang on 2023/1/12.
// Copyright © 2023 Tencent. All rights reserved.
//
import Foundation
import TUICore
enum PopUpViewType {
case roomInfoViewType
case moreViewType
case mediaSettingViewType
case userListViewType
case raiseHandApplicationListViewType
case transferMasterViewType
case QRCodeViewType
case chatViewType
case inviteViewType
case inviteMemberViewType
}
protocol PopUpViewModelResponder: AnyObject {
func searchControllerChangeActive(isActive: Bool)
func updateViewOrientation(isLandscape: Bool)
}
class PopUpViewModel {
let viewType: PopUpViewType
let height: CGFloat
var backgroundColor: UIColor?
weak var viewResponder: PopUpViewModelResponder?
init(viewType: PopUpViewType, height: CGFloat) {
self.viewType = viewType
self.height = height
}
func panelControlAction() {
changeSearchControllerActive()
RoomRouter.shared.dismissPopupViewController()
}
func changeSearchControllerActive() {
viewResponder?.searchControllerChangeActive(isActive: false)
}
deinit {
debugPrint("deinit \(self)")
}
}