Commit 806f0a2a by pierce

fixed bugs

parent 523e9cbb
......@@ -371,7 +371,7 @@ public class GDAlertView: BaseView {
}
// MARK: Method
private let minHeight: CGFloat = 164
private let minHeight: CGFloat = 180
public func show(on view: UIView, animate: Bool = true) {
guard self.superview == nil else { return }
view.addSubview(self)
......@@ -385,7 +385,7 @@ public class GDAlertView: BaseView {
buttonHeight = 45
}
let topSpace: CGFloat = 4
let topSpace: CGFloat = 24
let contentSpace: CGFloat = 4
let buttonSpace: CGFloat = 16
......@@ -403,7 +403,7 @@ public class GDAlertView: BaseView {
if bgView.height < minHeight {
bgView.height = minHeight
contentLabel.centerY = bgView.height / 2.0 - 10
contentLabel.centerY = bgView.height / 2.0
titleLabel.y = contentLabel.y - contentSpace - titleLabel.height
}
......
......@@ -89,10 +89,7 @@ class GDWebviewPlugin: GDToolBoxWebviewPlugin {
/// 打开发布动态界面
override func showMomentVC(rootVC: UIViewController?) {
/// 打开动态页面
if let momentPlaza = GDRouter.Moment?.momentPlazaController() {
momentPlaza.hidesBottomBarWhenPushed = true
rootVC?.navigationController?.pushViewController(momentPlaza, animated: true)
}
GDRouter.Tabbar?.jumpToTabbar(page: .moment, rootVC: rootVC)
}
/// 打开发布动态界面
......
......@@ -99,6 +99,8 @@ extension GDBaseBussinessModule: BifrostModuleProtocol {
// 埋点
GDStatistics.track(.open)
// 开启友盟统计
UMConfigure.initWithAppkey("66714089cd5dc22f9621c1cd", channel: GDAppConfig.gd_cid)
if application.responds(to: #selector(UIApplication.registerUserNotificationSettings(_:))) {
let settings = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
UIApplication.shared.registerUserNotificationSettings(settings)
......
......@@ -511,7 +511,7 @@ class GDLiveAnchorStartView: BaseView {
guard let self = self else { return }
GDlog.verbose("====> Test End \(self.startEnable)")
if success {
let wishStr = ""//self.viewModel.wishListViewModel.convertToWishStr()
let wishStr = self.viewModel.wishListViewModel.convertToWishStr()
// 成功之后在外部等待推流成功后销毁progressVIew
self.completionHandler?(theme!, isContinue, wishStr)
self.beautyPanelView?.dismiss()
......
......@@ -883,6 +883,7 @@ class GDLiveFunctionView: BaseView {
.disposed(by: disposeBag)
Observable.combineLatest(progressActivityBottomSpace.distinctUntilChanged(), self.activityWebView.viewModel.weburl, viewModel.hadWishList).subscribe(onNext: {[weak self] space, url, hadWishList in
guard let self = self else { return }
guard let _ = GDLiveHelper.shared.roomid.value else { return }
var realSpace = space
if isValidString(url) == false {
realSpace = 0
......@@ -892,13 +893,30 @@ class GDLiveFunctionView: BaseView {
}
if hadWishList {
if ((self.wishListView.superview) != nil) {
self.wishListView.snp.remakeConstraints { (make) in
make.width.equalTo(60)
make.height.equalTo(88)
make.bottom.equalTo(self.activityWebView.snp.bottom).offset(-realSpace)
if self.watchTimeView.isHidden || self.watchTimeView.superview == nil {
make.bottom.equalTo(self.activityWebView.snp.top)
} else {
make.bottom.equalTo(self.watchTimeView.snp.top)
}
make.centerX.equalTo(self.activityWebView.snp.centerX)
}
}
if self.progressActivityView.superview != nil {
self.progressActivityView.snp.remakeConstraints { make in
make.bottom.equalTo(self.wishListView.snp.top)
make.centerX.equalTo(self.activityWebView.snp.centerX)
make.width.equalTo(self.progressActivityView.width)
make.height.equalTo(self.progressActivityView.width + 20)
}
}
} else {
if ((self.wishListView.superview) != nil) {
self.wishListView.snp.remakeConstraints { (make) in
make.width.equalTo(60)
make.height.equalTo(0)
......@@ -906,6 +924,27 @@ class GDLiveFunctionView: BaseView {
make.centerX.equalTo(self.activityWebView.snp.centerX)
}
}
if self.progressActivityView.superview != nil {
self.progressActivityView.snp.remakeConstraints { (make) in
if GDLiveHelper.shared.role.value == .anchor {
if self.activityWebView.superview != nil {
make.bottom.equalTo(self.activityWebView.snp.top)
} else {
return
}
} else {
if self.watchTimeView.superview != nil {
make.bottom.equalTo(self.watchTimeView.snp.top)
} else {
return
}
}
make.centerX.equalTo(self.activityWebView.snp.centerX)
make.width.equalTo(self.progressActivityView.width)
make.height.equalTo(self.progressActivityView.width + 20)
}
}
}
}).disposed(by: disposeBag)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment