Fix the width of the indicator so that it would stop reflowing the cell when changed to star
This commit is contained in:
parent
bf8a52d710
commit
2f99cd01c1
|
@ -13,22 +13,25 @@ struct TimelineItemStatusView: View {
|
|||
var status: TimelineItemStatus
|
||||
|
||||
@ViewBuilder var statusView: some View {
|
||||
switch status {
|
||||
case .showUnread:
|
||||
AppAssets.timelineUnread
|
||||
.resizable()
|
||||
.frame(width: 8, height: 8, alignment: .center)
|
||||
.padding(.all, 2)
|
||||
case .showStar:
|
||||
AppAssets.timelineStarred
|
||||
.resizable()
|
||||
.frame(width: 10, height: 10, alignment: .center)
|
||||
case .showNone:
|
||||
AppAssets.timelineUnread
|
||||
.resizable()
|
||||
.frame(width: 8, height: 8, alignment: .center)
|
||||
.padding(.all, 2)
|
||||
.opacity(0)
|
||||
ZStack {
|
||||
Spacer().frame(width: 12)
|
||||
switch status {
|
||||
case .showUnread:
|
||||
AppAssets.timelineUnread
|
||||
.resizable()
|
||||
.frame(width: 8, height: 8, alignment: .center)
|
||||
.padding(.all, 2)
|
||||
case .showStar:
|
||||
AppAssets.timelineStarred
|
||||
.resizable()
|
||||
.frame(width: 10, height: 10, alignment: .center)
|
||||
case .showNone:
|
||||
AppAssets.timelineUnread
|
||||
.resizable()
|
||||
.frame(width: 8, height: 8, alignment: .center)
|
||||
.padding(.all, 2)
|
||||
.opacity(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue