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

[trello.com/c/ciHCs1De]: fix not updating row height after balance change #634

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ChrisBenua
Copy link
Collaborator

.cellUpdate from 141 line was overwritten in 158 line. So, code from line 141 is useless, we can delete it. But it was not the only reason caused bug.

Now height of balance cell is calculated based on current row ViewModel: $0.cell.height = { row.value?.fiat != nil ? BalanceTableViewCell.fullHeight : BalanceTableViewCell.compactHeight }.

According to docs, to update cell height (not the content), we should call updateCell just before reload call. Without reload call height of cell will not be updated

@ChrisBenua ChrisBenua force-pushed the dev/trello.com/c/ciHCs1De branch from 67e4d39 to 214bd51 Compare January 8, 2025 19:44
let height = row.value?.fiat != nil ? BalanceTableViewCell.fullHeight : BalanceTableViewCell.compactHeight

cell.height = { height }
cell.titleLabel.text = BaseRows.balance.localized
Copy link
Member

Choose a reason for hiding this comment

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

Why so much of code is removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was dead code, it never executes. Because line 158 overwrite cellUpdateCallback variable inside Eureka

@ChrisBenua ChrisBenua force-pushed the dev/trello.com/c/ciHCs1De branch from 214bd51 to 55708b9 Compare January 10, 2025 20:46
@ChrisBenua ChrisBenua changed the base branch from release/3.10.0 to develop January 10, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants