-
-
Notifications
You must be signed in to change notification settings - Fork 499
fix(whatsnew): re-load entries when app language changes #526
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In Kotlin coroutines, should CancellationException be rethrown when using catch(Throwable) in ViewModel coroutine blocks?💡 Result:
Yes—when you catch a broad
Throwablein code running inviewModelScope(or any structured coroutine), you should not “consume”CancellationException. Either (a) don’t catch it in the first place by catching specific exceptions, or (b) if you must catchThrowable, then rethrow when it’sCancellationException(directly or viaensureActive()), so coroutine cancellation can complete correctly. Rationale (grounded in docs): 1) Android’s coroutines best-practices explicitly says: “don’t consume exceptions of typeCancellationException(don’t catch them, or always rethrow them if caught)” [1]. 2) Kotlin coroutines treat cancellation as exceptional control flow: coroutines useCancellationExceptionfor cancellation, and “these exceptions are ignored by all handlers” [2]. If you catch them and don’t rethrow/propagate, you prevent the coroutine from terminating as cancellation expects. 3) Kotlin documentation recommends using atry/catchto handle exceptions within the coroutine body, and notes thatCancellationExceptionis part of the cancellation mechanism (and is ignored by handlers) [3][2]. Practical pattern when usingcatch(Throwable): - Prefer catching specific exceptions (e.g.,IOException) instead ofThrowableinviewModelScopeblocks. - If you must catchThrowable, do: - ife is CancellationException-> rethrowe- otherwise handle/log the error A common equivalent iscoroutineContext.ensureActive()at the top of thecatch, which will rethrow cancellation if the coroutine is actually cancelled. So the direct answer to your question is: yes,CancellationExceptionshould effectively be rethrown (not swallowed) when usingcatch(Throwable)inViewModelcoroutine blocks, to preserve correct cooperative cancellation [1][2].Citations:
🏁 Script executed:
Repository: OpenHub-Store/GitHub-Store
Length of output: 1655
🏁 Script executed:
Repository: OpenHub-Store/GitHub-Store
Length of output: 2109
🏁 Script executed:
Repository: OpenHub-Store/GitHub-Store
Length of output: 1269
Rethrow
CancellationExceptionin broadThrowablecatches to preserve cancellation semantics.Lines 49-50, 60-61, and 68-69 use
catch (t: Throwable), which swallowsCancellationException. This breaks ViewModel cancellation and can emit misleading error logs when the ViewModel is cleared. Addif (t is CancellationException) throw tin each block and importCancellationExceptionfromkotlinx.coroutines.Proposed fix
🤖 Prompt for AI Agents