Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Move all emojis to the client. #6

Merged
merged 1 commit into from
Dec 19, 2018
Merged

Conversation

datacarl
Copy link
Member

No description provided.

@datacarl
Copy link
Member Author

Doesn't work after a hot code reload. Need to seed the local collectoin again at that point.

"tags": []
}, {
"emoji": "🚑",
"description": "ambulan
Copy link
Contributor

Choose a reason for hiding this comment

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

How come _collection? I can't find any references to it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Afaik it's the only way I know of to insert documents on the client only (and yes, it's a hack). But meteor seems to clear the collection when a hot code reload happens, so we need to repopulate it. I just can't find a hook for that. There is Meteor._onMigrate but that runs before the reload takes place. I want to know when a reload just happened.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. Looks good to me then!

Too bad about no post-action on a reload :/ Otherwise we could've stored away the collection's content just before a reload, and then re-seeding.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

@datacarl datacarl Dec 17, 2018

Choose a reason for hiding this comment

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

Ackschhtually, it looks like it does work as it is, even after a hot code push. I think I ran into another error that prevented the emojis from loading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@brookback brookback merged commit b16cbbf into master Dec 19, 2018
@brookback brookback deleted the feature/client-side-emojis-only branch December 19, 2018 09:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants