Skip to content

Commit

Permalink
bugfix: tisfeng#305 reset AppleLanguages values
Browse files Browse the repository at this point in the history
  • Loading branch information
phlpsong committed Jan 5, 2024
1 parent aaf914c commit 4e2989f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Easydict/Feature/Service/Language/EZLanguageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ + (void)destroySharedInstance {
}

- (void)setup {
// Ref: https://stackoverflow.com/a/25011408
// A workaround of `AppleLanguages` not refresh once inserted object
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AppleLanguages"];
NSArray *showingLanguages = [EZLanguageManager.shared allLanguages];
self.allLanguageFlagDict = [[MMOrderedDictionary alloc] init];
for (EZLanguage language in showingLanguages) {
Expand Down

0 comments on commit 4e2989f

Please sign in to comment.