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

#3 Implemented URL-based sharing #28

Merged
merged 4 commits into from
Dec 26, 2017
Merged

#3 Implemented URL-based sharing #28

merged 4 commits into from
Dec 26, 2017

Conversation

KyLeggiero
Copy link
Member

No description provided.

Copy link
Member Author

@KyLeggiero KyLeggiero left a comment

Choose a reason for hiding this comment

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

Cannot share URL; link creators don't like the brackets and braces

fun RentSplitState.serialized(): String = JSON.stringify(this.toJson())
fun RentSplitState.serialized(purpose: SerializationPurpose) = when (purpose) {
forLocalStorage -> JSON.stringify(this.toJson(purpose))
forSharing -> encodeURIComponent(JSON.stringify(this.toJson(purpose)))
Copy link
Member Author

@KyLeggiero KyLeggiero Dec 26, 2017

Choose a reason for hiding this comment

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

While this works to make the shared URI clickable by all tested interpreters, it also results in a very long URL. I'll create a new ticket (#29). Not a dealbreaker, though. This can be merged now.

@KyLeggiero KyLeggiero merged commit 710b382 into master Dec 26, 2017
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.

1 participant