Skip to content

Commit

Permalink
UI Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed May 15, 2021
1 parent 6d64a16 commit 568aaf6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RedditOs/Features/Post/PostDetailHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct PostDetailHeader: View {
HStack {
Text(listing.title)
.font(.title)
.lineLimit(5)
.lineLimit(10)
.multilineTextAlignment(.leading)
.truncationMode(.tail)
if let url = listing.thumbnailURL, url.pathExtension != "jpg", url.pathExtension != "png" {
Expand Down
5 changes: 3 additions & 2 deletions RedditOs/Features/Subreddit/SubredditPostsListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ struct SubredditPostsListView: View, Equatable {
ToolbarItem(placement: .navigation) {
Group {
if isDefaultChannel {
placeholderIcon
} else if let icon = viewModel.subreddit?.iconImg, let url = URL(string: icon) {
EmptyView()
} else if let icon = viewModel.subreddit?.iconImg,
let url = URL(string: icon) {
KFImage(url)
.placeholder{ placeholderIcon }
.resizable()
Expand Down
4 changes: 3 additions & 1 deletion RedditOs/Shared/FlairView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct FlairView: View {
if backgroundColor == .gray {
return .white
}
return textColorHex == "dark" ? .black : .white
return textColorHex == "dark" ? .textColor : .white
}

@ViewBuilder
Expand All @@ -51,6 +51,8 @@ struct FlairView: View {
.foregroundColor(textColor)
.font(display == .small ? .footnote : .callout)
.fontWeight(.semibold)
.lineLimit(1)
.truncationMode(.tail)
} else {
EmptyView()
}
Expand Down

0 comments on commit 568aaf6

Please sign in to comment.