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

Split cell reuse identifiers to segregate subtitle cells #7585

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

acb-mv
Copy link
Contributor

@acb-mv acb-mv commented Feb 3, 2025

Cells in the settings page would fluctuate on view appearance between subtitle and regular styles. This was due to all cells having the same reuse identifier, despite changelog cells being created with the subtitle style while others had the default style. This change gives changelog cells their own reuse identifier, fixing this.


This change is Reviewable

@acb-mv acb-mv added bug iOS Issues related to iOS labels Feb 3, 2025
@acb-mv acb-mv self-assigned this Feb 3, 2025
Copy link

linear bot commented Feb 3, 2025

rablador
rablador previously approved these changes Feb 3, 2025
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@acb-mv
Copy link
Contributor Author

acb-mv commented Feb 4, 2025

ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

Previously, mojganii wrote…

Since we are using cells with diffrent types and identifier in the table view, maybe we can remove registration here and dequeue that in datasource at makeCell and do changing around CellReuseIdentifiers. reusableViewClass to return UITableViewCell:

Great idea. I'll rename reusableViewClass, though, as it is no longer a class value but an instantiated object. (And given that it is an operation, making it a function rather than a computer variable would make it clearer.)

@acb-mv
Copy link
Contributor Author

acb-mv commented Feb 4, 2025

ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

Previously, acb-mv wrote…

Great idea. I'll rename reusableViewClass, though, as it is no longer a class value but an instantiated object. (And given that it is an operation, making it a function rather than a computer variable would make it clearer.)

Done

@acb-mv acb-mv requested review from rablador and mojganii February 4, 2025 15:56
Copy link
Contributor Author

@acb-mv acb-mv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @mojganii and @rablador)


ios/MullvadVPN/View controllers/Settings/SettingsDataSource.swift line 139 at r1 (raw file):

Previously, mojganii wrote…

if we are going to use this type of dequeue we should not have registered cells, then we need to remove otherwise it doesn't work :

Done

@acb-mv acb-mv dismissed a stale review via ebeff77 February 5, 2025 13:46
@acb-mv acb-mv requested a review from mojganii February 5, 2025 14:11
rablador
rablador previously approved these changes Feb 6, 2025
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r2, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)

@acb-mv acb-mv force-pushed the ios-1038-settings-cell-constraint-flux branch from ebeff77 to 672f3b3 Compare February 6, 2025 12:48
@acb-mv acb-mv dismissed stale reviews from rablador and ghost via 699b497 February 6, 2025 13:10
@acb-mv acb-mv force-pushed the ios-1038-settings-cell-constraint-flux branch from 672f3b3 to 699b497 Compare February 6, 2025 13:10
Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r2, 1 of 1 files at r4, 1 of 2 files at r6, all commit messages.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @mojganii and @rablador)

@buggmagnet buggmagnet force-pushed the ios-1038-settings-cell-constraint-flux branch from 699b497 to fe4e062 Compare February 6, 2025 14:04
@buggmagnet buggmagnet merged commit 51b7943 into main Feb 6, 2025
10 of 11 checks passed
@buggmagnet buggmagnet deleted the ios-1038-settings-cell-constraint-flux branch February 6, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants