Fix the width of the indicator so that it would stop reflowing the cell when changed to star

This commit is contained in:
Maurice Parker 2020-07-10 10:13:18 -05:00
parent bf8a52d710
commit 2f99cd01c1

View File

@ -13,22 +13,25 @@ struct TimelineItemStatusView: View {
var status: TimelineItemStatus var status: TimelineItemStatus
@ViewBuilder var statusView: some View { @ViewBuilder var statusView: some View {
switch status { ZStack {
case .showUnread: Spacer().frame(width: 12)
AppAssets.timelineUnread switch status {
.resizable() case .showUnread:
.frame(width: 8, height: 8, alignment: .center) AppAssets.timelineUnread
.padding(.all, 2) .resizable()
case .showStar: .frame(width: 8, height: 8, alignment: .center)
AppAssets.timelineStarred .padding(.all, 2)
.resizable() case .showStar:
.frame(width: 10, height: 10, alignment: .center) AppAssets.timelineStarred
case .showNone: .resizable()
AppAssets.timelineUnread .frame(width: 10, height: 10, alignment: .center)
.resizable() case .showNone:
.frame(width: 8, height: 8, alignment: .center) AppAssets.timelineUnread
.padding(.all, 2) .resizable()
.opacity(0) .frame(width: 8, height: 8, alignment: .center)
.padding(.all, 2)
.opacity(0)
}
} }
} }