Skip to content

Commit

Permalink
Fix dark mode issues in GVA
Browse files Browse the repository at this point in the history
Some of the views were rendered differently in dark mode, and needed
some adjustments.
  • Loading branch information
rasmustautsglia authored and github-review-helper committed Aug 14, 2023
1 parent 37fd885 commit 36a1061
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ final class GvaGalleryListView: BaseView {
).activate()
}

override func defineLayout() {
super.defineLayout()
collectionView.backgroundColor = UIColor.clear
}

// MARK: - Initialization

init(environment: Environment) {
Expand Down
13 changes: 13 additions & 0 deletions GliaWidgets/Sources/View/Chat/GVA/QuickReply/QuickReplyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ final class QuickReplyView: BaseView {
collectionView.trailingAnchor.constraint(equalTo: safeAreaLayoutGuide.trailingAnchor)
])
}

override func layoutSubviews() {
super.layoutSubviews()
switch style.backgroundColor {
case .fill(let color):
collectionView.backgroundColor = color
case .gradient(let colors):
makeGradientBackground(
colors: colors,
cornerRadius: style.cornerRadius
)
}
}
}

// MARK: - Private
Expand Down

0 comments on commit 36a1061

Please sign in to comment.