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]: Telephone layout + Telephone deletion #144

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

skyefreeman
Copy link
Contributor

This fixes issue #143

Problem

On the telephone Cookbook example:

  • digits cannot be fully deleted.
  • vertical layout is uneven.

Solution

  • Fix delete + phone call digit gating to check for > 0 characters.
  • Set a specific vertical spacing value to enforce a uniform layout.
Before After
CleanShot 2024-01-04 at 12 32 36 CleanShot 2024-01-04 at 12 30 48

// MARK: - Phone - Private

private func formattedPhoneNumber(_ digits: String) -> String {
return digits == "" ? " " : digits
Copy link
Contributor Author

Choose a reason for hiding this comment

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

With an empty string, the VStack collapses since the Text's vertical space is not retained, this ensures that doesn't happen (incidentally, is also why I expect last10Digits defaulted to " ").

@NickCulbertson NickCulbertson merged commit cdc782e into AudioKit:main Jan 4, 2024
1 check passed
@NickCulbertson
Copy link
Member

Thanks!

There seems to be some odd behavior when you drag on the call and hang up buttons but that's a separate issue.

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