Skip to content

Commit

Permalink
Merge pull request #380 from zsw666/master
Browse files Browse the repository at this point in the history
uikit v9.6.3 & callkit v2.2.0
  • Loading branch information
shine2008 committed Nov 8, 2023
2 parents f161afd + 6595248 commit e7af598
Show file tree
Hide file tree
Showing 297 changed files with 3,079 additions and 1,372 deletions.
3 changes: 1 addition & 2 deletions NEChatUIKit/NEChatUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = 'NEChatUIKit'
s.version = '9.6.1'
s.version = '9.6.3'
s.summary = 'Chat Module of IM.'

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -46,7 +46,6 @@ TODO: Add long description of the pod here.
s.dependency 'NECommonUIKit'
s.dependency 'NECommonKit'
s.dependency 'MJRefresh'
s.dependency 'UITextView+Placeholder'
s.dependency 'SDWebImageWebPCoder'
s.dependency 'SDWebImageSVGKitPlugin'
s.dependency 'lottie-ios','2.5.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import NECommonUIKit
// this cell has rounding corner style
import UIKit
import NECommonUIKit

@objcMembers
public class ChatCornerCell: CornerCell {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECommonKit
import UIKit

@objcMembers
open class NEChatBaseCell: UITableViewCell {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreKit
import NECommonUIKit
import NECoreKit
import UIKit

@objcMembers
open class ChatBaseViewController: UIViewController, UIGestureRecognizerDelegate {
Expand Down Expand Up @@ -55,12 +55,14 @@ open class ChatBaseViewController: UIViewController, UIGestureRecognizerDelegate

private func setupBackUI() {
let image = UIImage.ne_imageNamed(name: "backArrow")?.withRenderingMode(.alwaysOriginal)
navigationItem.leftBarButtonItem = UIBarButtonItem(
let backItem = UIBarButtonItem(
image: image,
style: .plain,
target: self,
action: #selector(backEvent)
)
backItem.accessibilityIdentifier = "id.backArrow"
navigationItem.leftBarButtonItem = backItem
navigationController?.navigationBar.topItem?.backBarButtonItem = UIBarButtonItem()
navigationController?.navigationBar.topItem?.backBarButtonItem?.tintColor = .ne_darkText
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreKit
import UIKit

@objcMembers
open class ChatTableViewController: NEBaseViewController, UITableViewDelegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreIMKit
import NIMSDK
import MJRefresh
import AVFoundation
import MJRefresh
import NEChatKit
import NECommonKit
import NECoreKit
import NECommonUIKit
import WebKit
import NEChatKit
import NECoreIMKit
import NECoreKit
import NIMSDK
import Photos
import UIKit
import WebKit

@objcMembers
open class ChatViewController: ChatBaseViewController, UINavigationControllerDelegate,
Expand Down Expand Up @@ -121,8 +121,19 @@ open class ChatViewController: ChatBaseViewController, UINavigationControllerDel

weak var weakSelf = self
NEChatDetectNetworkTool.shareInstance.netWorkReachability { status in
if status == .notReachable, let networkView = weakSelf?.brokenNetworkView {
weakSelf?.view.addSubview(networkView)
if status == .notReachable,
let networkView = weakSelf?.brokenNetworkView,
let self = weakSelf {
self.view.addSubview(networkView)
NSLayoutConstraint.activate([
networkView.topAnchor.constraint(
equalTo: self.tableView.topAnchor,
constant: 0
),
networkView.leftAnchor.constraint(equalTo: self.view.leftAnchor),
networkView.rightAnchor.constraint(equalTo: self.view.rightAnchor),
networkView.heightAnchor.constraint(equalToConstant: self.networkToolHeight),
])
} else {
weakSelf?.brokenNetworkView.removeFromSuperview()
}
Expand Down Expand Up @@ -246,6 +257,7 @@ open class ChatViewController: ChatBaseViewController, UINavigationControllerDel
let view =
NEBrokenNetworkView(frame: CGRect(x: 0, y: kNavigationHeight + KStatusBarHeight,
width: kScreenWidth, height: networkToolHeight))
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()

Expand Down Expand Up @@ -1140,7 +1152,7 @@ open class ChatViewController: ChatBaseViewController, UINavigationControllerDel
if atIndexs.isEmpty {
return
}
NELog.infoLog(className(), desc: "on revoke message at indexs \(atIndexs)")
operationView?.removeFromSuperview()
tableViewReloadIndexs(atIndexs)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECommonKit
import NECommonUIKit
import UIKit

@objc
public class ForwardItem: NSObject {
Expand All @@ -22,6 +22,7 @@ public class NEBaseForwardUserCell: UICollectionViewCell {
header.translatesAutoresizingMaskIntoConstraints = false
header.titleLabel.font = NEConstant.defaultTextFont(11.0)
header.clipsToBounds = true
header.accessibilityIdentifier = "id.forwardHeaderView"
return header
}()

Expand Down Expand Up @@ -85,6 +86,7 @@ public class NEBaseForwardAlertViewController: UIViewController, UICollectionVie
let header = NEUserHeaderView(frame: .zero)
header.clipsToBounds = true
header.translatesAutoresizingMaskIntoConstraints = false
header.accessibilityIdentifier = "id.forwardHeaderView"
return header
}()

Expand All @@ -102,6 +104,7 @@ public class NEBaseForwardAlertViewController: UIViewController, UICollectionVie
label.font = NEConstant.defaultTextFont(14.0)
label.textColor = .ne_darkText
label.numberOfLines = 0
label.accessibilityIdentifier = "id.forwardContentText"
return label
}()

Expand All @@ -125,6 +128,7 @@ public class NEBaseForwardAlertViewController: UIViewController, UICollectionVie
tip.font = NEConstant.defaultTextFont(16.0)
tip.textColor = .ne_darkText
tip.text = chatLocalizable("send_to")
tip.accessibilityIdentifier = "id.forwardTitle"
contentView.addSubview(tip)
NSLayoutConstraint.activate([
tip.leftAnchor.constraint(equalTo: contentView.leftAnchor, constant: 16.0),
Expand Down Expand Up @@ -207,11 +211,13 @@ public class NEBaseForwardAlertViewController: UIViewController, UICollectionVie
canceBtn.addTarget(self, action: #selector(cancelClick), for: .touchUpInside)
canceBtn.setTitle(chatLocalizable("cancel"), for: .normal)
canceBtn.setTitleColor(.ne_greyText, for: .normal)
canceBtn.accessibilityIdentifier = "id.forwardCancelBtn"

sureBtn.translatesAutoresizingMaskIntoConstraints = false
sureBtn.addTarget(self, action: #selector(sureClick), for: .touchUpInside)
sureBtn.setTitle(chatLocalizable("send"), for: .normal)
sureBtn.setTitleColor(.ne_blueText, for: .normal)
sureBtn.accessibilityIdentifier = "id.forwardSendBtn"

contentView.addSubview(canceBtn)
NSLayoutConstraint.activate([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NIMSDK
import UIKit

let PinMessageDefaultType = 1000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NIMSDK
import NECoreIMKit
import NECommonUIKit
import NECoreIMKit
import NIMSDK
import UIKit

@objcMembers
open class NEBaseReadViewController: ChatBaseViewController, UIScrollViewDelegate, UITableViewDelegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NEChatKit
import NECoreIMKit
import UIKit
public typealias DidSelectedAtRow = (_ index: Int, _ model: ChatTeamMemberInfoModel?) -> Void

@objcMembers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECommonKit
import NIMSDK
import UIKit

@objcMembers
open class NEBaseUserSettingViewController: ChatBaseViewController, UserSettingViewModelDelegate,
Expand All @@ -27,6 +27,7 @@ open class NEBaseUserSettingViewController: ChatBaseViewController, UserSettingV
let button = ExpandButton()
button.translatesAutoresizingMaskIntoConstraints = false
button.setImage(coreLoader.loadImage("setting_add"), for: .normal)
button.accessibilityIdentifier = "id.add"
return button
}()

Expand All @@ -36,6 +37,7 @@ open class NEBaseUserSettingViewController: ChatBaseViewController, UserSettingV
label.font = NEConstant.defaultTextFont(12.0)
label.textColor = .ne_darkText
label.textAlignment = .center
label.accessibilityIdentifier = "id.name"
return label
}()

Expand Down Expand Up @@ -244,6 +246,14 @@ open class NEBaseUserSettingViewController: ChatBaseViewController, UserSettingV
for: indexPath
) as? NEBaseUserSettingCell {
cell.configure(model)
if let c = cell as? UserSettingSwitchCell {
if model.cellName == chatLocalizable("message_remind") {
c.tSwitch.accessibilityIdentifier = "id.messageRemind"
}
if model.cellName == chatLocalizable("session_set_top") {
c.tSwitch.accessibilityIdentifier = "id.stickTop"
}
}
return cell
}
return UITableViewCell()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NEChatKit
import NECoreKit
import UIKit

@objcMembers
public class NEDetailMapController: ChatBaseViewController, NEMapGuideBottomViewDelegate {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreIMKit
import UIKit
@objc public protocol InputEmoticonContainerViewDelegate: NSObjectProtocol {
func selectedEmoticon(emoticonID: String, emotCatalogID: String, description: String)
func didPressSend(sender: UIButton)
Expand Down Expand Up @@ -210,6 +210,7 @@ extension InputEmoticonContainerView {
catalogID: id,
delegate: self
)
button.accessibilityIdentifier = "id.emoji"
rowIndex = indexInPage / layout.columes
coloumnIndex = indexInPage % layout.columes
let x = coloumnIndex * Int(layout.cellWidth) + startX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreIMKit
import UIKit
@objc public protocol InputEmoticonTabViewDelegate: NSObjectProtocol {
@objc optional func tabView(_ tabView: InputEmoticonTabView?, didSelectTabIndex index: Int)
}
Expand Down Expand Up @@ -86,6 +86,7 @@ public class InputEmoticonTabView: UIControl {
button.titleLabel?.textColor = .white
button.backgroundColor = UIColor.ne_blueText
button.titleLabel?.font = DefaultTextFont(14)
button.accessibilityIdentifier = "id.emojiSend"
return button
}()
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class NEEmotionTool: NSObject {
let regularArr = reExpression?.matches(
in: str,
options: .reportProgress,
range: NSRange(location: 0, length: str.count)
range: NSRange(location: 0, length: str.utf16.count)
)

let emoticons = NIMInputEmoticonManager.shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreIMKit
import UIKit
public protocol NIMInputEmoticonButtonDelegate: NSObjectProtocol {
func selectedEmoticon(emotion: NIMInputEmoticon, catalogID: String)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import UIKit
import NECoreIMKit
import UIKit
public enum NIMEmoticonType: NSInteger {
case file = 0
case unicode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// found in the LICENSE file.

import Foundation
import NIMSDK
import NECoreIMKit
import NIMSDK

@objcMembers
public class MessageUtils: NSObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// found in the LICENSE file.

import Foundation
import NIMSDK
import NECoreIMKit
import NECoreKit
import NIMSDK

public enum TeamType {
case advanceTeam
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

Expand Down
Loading

0 comments on commit e7af598

Please sign in to comment.