Skip to content

Commit 890c4f6

Browse files
committed
#6076 - Fix "Loading more messages..." not readable on custom chat wallpaper
1 parent aae0da7 commit 890c4f6

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Signal/ConversationView/CellViews/LoadMoreMessagesView.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ public class LoadMoreMessagesView: UICollectionReusableView {
1818
label.text = OWSLocalizedString("CONVERSATION_VIEW_LOADING_MORE_MESSAGES",
1919
comment: "Indicates that the app is loading more messages in this conversation.")
2020
super.init(frame: frame)
21-
addSubview(label)
22-
label.autoPinEdgesToSuperviewEdges()
23-
label.autoSetDimension(.height, toSize: LoadMoreMessagesView.fixedHeight)
21+
addSubview(blurView)
22+
blurView.contentView.addSubview(label)
23+
24+
blurView.autoPinEdge(toSuperviewEdge: .leading, withInset: 16, relation: .greaterThanOrEqual)
25+
blurView.autoPinEdge(toSuperviewEdge: .trailing, withInset: 16, relation: .greaterThanOrEqual)
26+
27+
label.autoPinEdgesToSuperviewEdges(with: UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16))
2428
label.textAlignment = .center
29+
blurView.autoCenterInSuperview()
2530
}
2631

2732
required init?(coder: NSCoder) {
@@ -32,6 +37,15 @@ public class LoadMoreMessagesView: UICollectionReusableView {
3237

3338
private let label = UILabel()
3439

40+
private let blurView: UIVisualEffectView = {
41+
let blurEffect = UIBlurEffect(style: .systemMaterial)
42+
let view = UIVisualEffectView(effect: blurEffect)
43+
view.layer.cornerRadius = 16
44+
view.clipsToBounds = true
45+
46+
return view
47+
}()
48+
3549
// MARK: Public
3650

3751
public func configureForDisplay() {

0 commit comments

Comments
 (0)