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 reuseIdentifier for empty message cells #203

Merged
merged 3 commits into from
Jul 18, 2017

Conversation

theginbin
Copy link
Contributor

What

Was testing something for @tiegz and found a bug where we didn't have the correct reuse identifier for empty Messages cells! Woops. This fixes that as well as points us to master on ReactiveExtensions with @stephencelis's latest update.

screen shot 2017-07-12 at 5 37 03 pm

@justinswart justinswart changed the title updated ReactiveExtensions Fix reuseIdentifier for empty message cells Jul 14, 2017
Copy link
Contributor

@justinswart justinswart left a comment

Choose a reason for hiding this comment

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

Cool cool!

@@ -14,7 +14,7 @@ internal final class MessageThreadsDataSource: ValueCellDataSource {
}

internal func emptyState(isVisible: Bool) {
self.set(cellIdentifiers: isVisible ? ["MessageThreadsEmptyState"] : [],
self.set(cellIdentifiers: isVisible ? ["MessageThreadEmptyStateCell"] : [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible to write a test? Also would be nice to throw this in an enum or constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i could write a test. i hate loose strings and would love to have an enum for all of our cell names, but it seems like a separate task?

@@ -7,14 +7,16 @@ internal final class MessageThreadsDataSource: ValueCellDataSource {
case messageThreads
}

internal let emptyStateCellIdentifier = String(describing: MessageThreadEmptyStateCell.self)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @stephencelis in lieu of a more standardized way of accessing these loose cell names across the codebase, I opted for this constant. Let me know if this works.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good! Wanna make it a static?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do!

Copy link
Contributor

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

Thanks for the tests!

@theginbin theginbin merged commit 0c2277a into master Jul 18, 2017
@theginbin theginbin deleted the fix-message-thread-cell-bad-id branch July 18, 2017 18:15
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.

None yet

3 participants