Skip to content

Commit bf1d08f

Browse files
committed
Apply code style
1 parent c08b7d4 commit bf1d08f

21 files changed

+208
-242
lines changed

Mixin.xcodeproj/project.pbxproj

Lines changed: 12 additions & 35 deletions
Large diffs are not rendered by default.
-1.79 KB
Loading
-3.56 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "[email protected]",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"filename" : "[email protected]",
14+
"idiom" : "universal",
15+
"scale" : "3x"
16+
}
17+
],
18+
"info" : {
19+
"author" : "xcode",
20+
"version" : 1
21+
}
22+
}
1.28 KB
Loading
1.83 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "[email protected]",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"filename" : "[email protected]",
14+
"idiom" : "universal",
15+
"scale" : "3x"
16+
}
17+
],
18+
"info" : {
19+
"author" : "xcode",
20+
"version" : 1
21+
}
22+
}
1.08 KB
Loading
1.54 KB
Loading

Mixin/UserInterface/Controllers/Chat/Cells/PhotoInputGridCell.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ class PhotoInputGridCell: UICollectionViewCell {
55
@IBOutlet weak var imageWrapperView: UIView!
66
@IBOutlet weak var imageView: UIImageView!
77
@IBOutlet weak var mediaTypeView: MediaTypeOverlayView!
8-
@IBOutlet weak var badge: BadgeView!
8+
@IBOutlet weak var statusImageView: UIImageView!
9+
@IBOutlet weak var indexLabel: UILabel!
910
@IBOutlet weak var overlayView: UIView!
1011

1112
let cornerRadius: CGFloat = 8
@@ -20,8 +21,6 @@ class PhotoInputGridCell: UICollectionViewCell {
2021
contentView.layer.shadowColor = UIColor.shadow.cgColor
2122
contentView.layer.shadowOpacity = 0.29
2223
contentView.layer.shadowRadius = 5
23-
badge.cornerRadius = 10
24-
badge.textColor = .white
2524
}
2625

2726
override func layoutSubviews() {
@@ -32,21 +31,18 @@ class PhotoInputGridCell: UICollectionViewCell {
3231
override func prepareForReuse() {
3332
super.prepareForReuse()
3433
imageView.image = nil
35-
overlayView.isHidden = true
3634
}
3735

3836
func updateBadge(with index: Int?) {
3937
if let index = index {
40-
badge.text = "\(index + 1)"
41-
badge.borderWidth = 0
42-
badge.borderColor = .clear
43-
badge.badgeColor = .theme
38+
indexLabel.text = "\(index + 1)"
39+
statusImageView.backgroundColor = .theme
40+
statusImageView.image = nil
4441
overlayView.isHidden = false
4542
} else {
46-
badge.text = nil
47-
badge.borderWidth = 1
48-
badge.borderColor = .white
49-
badge.badgeColor = .black.withAlphaComponent(0.16)
43+
indexLabel.text = nil
44+
statusImageView.backgroundColor = .clear
45+
statusImageView.image = R.image.ic_photo_unselected_narrow()
5046
overlayView.isHidden = true
5147
}
5248
}

0 commit comments

Comments
 (0)