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

feat: saving user preference on emoji autosuggest based on menu #347

Merged
merged 4 commits into from
Jul 30, 2023

Conversation

SaurabhJamadagni
Copy link
Collaborator

Contributor checklist


Description

Following up on issue #310, this PR adds the functionality for emoji autosuggest menu item. Changes include:

  • Adding the required reference in the userDefaults
  • Function to check if enabled in KeyboardViewController

Related issue

Hey @andrewtavis, I tested this with most of the cases where emojis would be suggested. Seems to work so far. Let me know if you come across a case where the emojis are showing despite the menu item. Probably missing a condition in that case but currently I think all cases should be covered.

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! It'd be great to have you!

Maintainer checklist

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution

    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo
  • The CHANGELOG has been updated with a description of the changes for the upcoming release (if necessary)

@andrewtavis andrewtavis self-requested a review July 25, 2023 17:15
@andrewtavis
Copy link
Member

@SaurabhJamadagni, just checking with you on whether it's set up to have the default be that this option is enabled :) Doesn't seem to be working as of now. I think we're good to go when that's set up!

@SaurabhJamadagni
Copy link
Collaborator Author

I think we're good to go when that's set up!

Sorry about the delay @andrewtavis. Making the changes now.

@SaurabhJamadagni
Copy link
Collaborator Author

Hey @andrewtavis, I am pushing the changes to assign defaults. Sharing a code snippet using which you could reset the UserDefaults. I ran it in my AboutViewController.swift > viewDidLoad function. But make sure to only load that view once to reset it to see if the toggles are being assigned defaults. After which I tested if persistence works by leaving and returning to the app.

let domain = "group.scribe.userDefaultsContainer"
UserDefaults.standard.removePersistentDomain(forName: domain)
print("user defaults have been reset")

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Looks great, @SaurabhJamadagni! Thanks for getting to these changes :) :) Hope you've had a nice weekend!

@andrewtavis andrewtavis merged commit 81be6ad into scribe-org:main Jul 30, 2023
@andrewtavis andrewtavis added the GSoC Available for Google Summer of Code participants label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Available for Google Summer of Code participants
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants