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

A few improvements to error handling #647

Merged
merged 5 commits into from
Aug 20, 2023

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Aug 17, 2023

Pull Request Description

This PR has a few related changes.

  1. Introduce a global BuildContext. This will allow us to perform localization in utility and other methods that are not directly connected to the UI.
  2. Introduce a Lemmy API error message mapping. Unfortunately, gen-l10n does not allow lookup by dynamic name, so we will have to build a giant switch, but at least there will be a single place to perform this mapping.
  3. Use a simple snackbar instead of fullscreen error message when attempting to block admins, which is forbidden.

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Before

qemu-system-x86_64_XJJ2w1cjfF.mp4

After

qemu-system-x86_64_yR9fUE4rMp.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility? -- N/A

@ajsosa ajsosa merged commit bf07d13 into thunder-app:develop Aug 20, 2023
1 check passed
@micahmo micahmo deleted the feature/error-improvements branch August 21, 2023 02:29
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

2 participants