badoo / badoo/Chatto

BaseMessagePresenter

Open
#469 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4.6k
Forks
588
PR merge metrics
No merged PRs in 30d

Description

I get a warning in 'guard let cell = cell as? CellT else': Cast from 'UICollectionViewCell' to related type 'BaseMessageCollectionViewCell'
in the following code:public final override func configureCell(_ cell: UICollectionViewCell, decorationAttributes: ChatItemDecorationAttributesProtocol?) {
guard let cell = cell as? CellT else {
assert(false, "Invalid cell given to presenter")
return
}
How can I silence these warning? (the app functions well as long as I can see)
Thanks in advance!

Contributor guide

Open the contributing guide

Research direction

Start with BaseMessagePresenter and its configureCell(_:, decorationAttributes:) method, especially the guard cast from UICollectionViewCell to CellT shown in the report. Reproduce the compiler warning in the app and inspect the related BaseMessageCollectionViewCell type. Done means the warning is silenced without changing the working cell configuration behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.