-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update throttling dependency #79
Conversation
@@ -20,15 +20,15 @@ class DebounceLangToolService extends LanguageCheckService { | |||
@override | |||
Future<Result<List<Mistake>>> findMistakes(String text) async { | |||
final value = | |||
await debouncing.debounce(() => baseService.findMistakes(text)) | |||
(await debouncing.debounce(() => baseService.findMistakes(text)) ?? []) | |||
as Result<List<Mistake>>; |
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.
Casts should be obsolete now.
as Result<List<Mistake>>; | |
; |
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.
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.
Right -- because you're trying to assign a List
instead of Result<List>
-- so the static analyzer gets confused and downgrades everything to Object
.
@@ -30,7 +30,7 @@ class ThrottlingLangToolService extends LanguageCheckService { | |||
|
|||
@override | |||
Future<void> dispose() async { | |||
await throttling.close(); | |||
throttling.close(); |
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.
Throttling has a generic arg too, let's remove the typecast
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.
LGTM
No description provided.