Skip to content

Commit a7c5e2c

Browse files
committed
* Supported - access control for customizing classes and functions
* Modified - `userDidLeave` logic for `includeEmptyChannel` * Improved - Stability
1 parent 6078452 commit a7c5e2c

File tree

72 files changed

+3962
-945
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+3962
-945
lines changed

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22

3-
### v1.1.0 (July 10, 2020)
3+
### v1.1.1 (Jul 17, 2020)
4+
* Supported - access control for customizing classes and functions
5+
* Modified - `userDidLeave` logic for `includeEmptyChannel`
6+
* Improved - Stability
7+
8+
### v1.1.0 (Jul 10, 2020)
49
* Supported - Reaction feature
510
* Added classes
611
* `SBUReactionsViewController`
@@ -13,15 +18,15 @@
1318
* `setLongTapEmojiGestureHandler(cell:emojiKey:)` in `SBUChannelViewController` class
1419
* `showEmojiListModal(message:)` in `SBUChannelViewController` class
1520

16-
### v1.0.11 (June 25, 2020)
21+
### v1.0.11 (Jun 25, 2020)
1722
* Supported - Custom `SBDChanngeListQuery` in the initialization function of `SBUChannelListViewController`
1823
* Supported - Custom `SBDMessageListParams` in the initialization function of `SBUChannelViewController`
1924
* Added - Unknown type message
2025

21-
### v1.0.10 (June 18, 2020)
26+
### v1.0.10 (Jun 18, 2020)
2227
* Fixed - Incorrect operator check logic in frozen group channel
2328

24-
### v1.0.9 (June 8, 2020)
29+
### v1.0.9 (Jun 8, 2020)
2530
* Supported - customized params, Changed access control
2631
* **`SBUChannelViewController`**
2732
* `channel`, `messageList`, `resendableMessages` properties

SendBirdUIKit.framework.dSYM/Contents/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleSignature</key>
1414
<string>????</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>1.1.0</string>
16+
<string>1.1.1</string>
1717
<key>CFBundleVersion</key>
1818
<string>1</string>
1919
</dict>
170 KB
Binary file not shown.

SendBirdUIKit.framework/Assets.car

0 Bytes
Binary file not shown.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//
2+
// Array+SBUKit.swift
3+
// SendBirdUIKit
4+
//
5+
// Created by Tez Park on 2020/07/16.
6+
// Copyright © 2020 SendBird, Inc. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
12+
public extension Array where Element: SBUUser {
13+
func sbu_getUserIds() -> [String] {
14+
let userIds: [String] = self.map ({ $0.userId })
15+
return userIds
16+
}
17+
18+
func sbu_getUserNicknames() -> [String] {
19+
let userNicknames: [String] = self.map ({ $0.refinedNickname() })
20+
return userNicknames
21+
}
22+
}
23+
24+
public extension Array where Element: SBDUser {
25+
func sbu_convertUserList() -> [SBUUser] {
26+
let userList = self.map { SBUUser(user: $0) }
27+
return userList
28+
}
29+
}
30+
31+
public extension NSArray {
32+
// For SBUUser type array
33+
@objc func sbu_getUserIds() -> [String] {
34+
guard let users = self as? [SBUUser] else { return [] }
35+
return users.sbu_getUserIds()
36+
}
37+
38+
@objc func sbu_getUserNicknames() -> [String] {
39+
guard let users = self as? [SBUUser] else { return [] }
40+
return users.sbu_getUserNicknames()
41+
}
42+
43+
// For SBDUser type array
44+
@objc func sbu_convertUserList() -> [SBUUser] {
45+
guard let users = self as? [SBDUser] else { return [] }
46+
return users.sbu_convertUserList()
47+
}
48+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
//
2+
// SBUAdminMessageCell.swift
3+
// SendBirdUIKit
4+
//
5+
// Created by Harry Kim on 2020/02/20.
6+
// Copyright © 2020 SendBird, Inc. All rights reserved.
7+
//
8+
9+
import UIKit
10+
import SendBirdSDK
11+
12+
@objcMembers @IBDesignable
13+
open class SBUAdminMessageCell: SBUBaseMessageCell {
14+
15+
// MARK: - Public property
16+
public var messageLabel = UILabel()
17+
18+
// MARK: - View Lifecycle
19+
open override func setupViews() {
20+
super.setupViews()
21+
self.messageContentView.addSubview(self.messageLabel)
22+
}
23+
24+
open override func setupAutolayout() {
25+
super.setupAutolayout()
26+
27+
self.messageLabel
28+
.setConstraint(from: self.messageContentView, left: 28, right: 27, top: 0, bottom: 0)
29+
}
30+
31+
open override func layoutSubviews() {
32+
super.layoutSubviews()
33+
let message = self.messageLabel.text ?? ""
34+
let attributes: [NSAttributedString.Key : Any] = [ .font: theme.adminMessageFont,
35+
.foregroundColor : theme.adminMessageTextColor
36+
]
37+
38+
let attributedString = NSMutableAttributedString(string: message, attributes: attributes)
39+
let paragraphStyle = NSMutableParagraphStyle()
40+
paragraphStyle.alignment = .center
41+
paragraphStyle.lineSpacing = 8
42+
attributedString.addAttribute(.paragraphStyle,
43+
value: paragraphStyle,
44+
range: NSMakeRange(0, attributedString.length))
45+
46+
self.messageLabel.attributedText = attributedString
47+
}
48+
49+
// MARK: - Common
50+
public func configure(_ message: SBDAdminMessage, hideDateView: Bool) {
51+
super.configure(message: message, position: .center, hideDateView: hideDateView, receiptState: .none)
52+
53+
self.messageLabel.numberOfLines = 0
54+
self.messageLabel.textAlignment = .center
55+
self.messageLabel.text = message.message
56+
self.layoutIfNeeded()
57+
}
58+
59+
// MARK: - Action
60+
open override func setSelected(_ selected: Bool, animated: Bool) {
61+
super.setSelected(selected, animated: animated)
62+
}
63+
64+
// MARK: - Private property
65+
private var adminMessage: SBDAdminMessage? {
66+
return self.message as? SBDAdminMessage
67+
}
68+
69+
}

SendBirdUIKit.framework/Headers/SBUBaseMessageCell.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public class MessageProfileView: UIView {
238238

239239
func configure(urlString: String) {
240240
self.urlString = urlString
241-
self.imageView.loadImage(urlString: urlString, placeholder: SBUIconSet.iconUser.with(tintColor: theme.userPlaceholderTintColor))
241+
self.imageView.loadImage(urlString: urlString, placeholder: SBUIconSet.iconUser.sbu_with(tintColor: theme.userPlaceholderTintColor))
242242
self.imageView.backgroundColor = theme.userPlaceholderBackgroundColor
243243
self.setNeedsLayout()
244244
}
@@ -411,7 +411,7 @@ public class MessageStateView: UIView {
411411
case .none:
412412
stateImage = nil
413413
case .pending:
414-
stateImage = SBUIconSet.iconSpinnerSmall.with(tintColor: theme.pendingStateColor)
414+
stateImage = SBUIconSet.iconSpinnerSmall.sbu_with(tintColor: theme.pendingStateColor)
415415

416416
let rotation = CABasicAnimation(keyPath: "transform.rotation")
417417
rotation.fromValue = 0
@@ -421,15 +421,15 @@ public class MessageStateView: UIView {
421421
stateImageView.layer.add(rotation, forKey: "Spin")
422422

423423
case .failed, .canceled:
424-
stateImage = SBUIconSet.iconFailed.with(tintColor: theme.failedStateColor)
424+
stateImage = SBUIconSet.iconFailed.sbu_with(tintColor: theme.failedStateColor)
425425
case .succeeded:
426426
switch receiptState {
427427
case .none:
428-
stateImage = SBUIconSet.iconSent.with(tintColor: theme.succeededStateColor)
428+
stateImage = SBUIconSet.iconSent.sbu_with(tintColor: theme.succeededStateColor)
429429
case .readReceipt:
430-
stateImage = SBUIconSet.iconRead.with(tintColor: theme.readReceiptStateColor)
430+
stateImage = SBUIconSet.iconRead.sbu_with(tintColor: theme.readReceiptStateColor)
431431
case .deliveryReceipt:
432-
stateImage = SBUIconSet.iconDelivered.with(tintColor: theme.deliveryReceiptStateColor)
432+
stateImage = SBUIconSet.iconDelivered.sbu_with(tintColor: theme.deliveryReceiptStateColor)
433433
}
434434
@unknown default:
435435
stateImage = nil

0 commit comments

Comments
 (0)