Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dark mode issues in GVA #715

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super.defineLayout()

missed super call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed b613e53

}

// 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't layoutSubviews also need super? @yurii-glia

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does indeed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 5c4854f

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency yes, however, afaik, Apple doc for layoutSubviews method mentions that it is not necessary to call super for this method.

case .fill(let color):
collectionView.backgroundColor = color
case .gradient(let colors):
makeGradientBackground(
colors: colors,
cornerRadius: style.cornerRadius
)
}
}
}

// MARK: - Private
Expand Down