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
Remove obsolete comment #120265
Remove obsolete comment #120265
Conversation
The method `_stopCursorTimer` no longer exists.
@@ -2605,7 +2605,6 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien | |||
if (_tickersEnabled && _cursorActive) { | |||
_startCursorBlink(); | |||
} else if (!_tickersEnabled && _cursorTimer != null) { | |||
// Cannot use _stopCursorTimer because it would reset _cursorActive. |
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.
Shouldn't this be changed to -> _stopCursorBlink?
IMHO the comment is useful as looking at the lines above it'd be tempting to do the opposite of _startCursorBlink()
void _stopCursorBlink({ bool resetCharTicks = true }) {
_cursorActive = false;
_cursorBlinkOpacityController.value = 0.0;
_cursorTimer?.cancel();
_cursorTimer = null;
if (resetCharTicks) {
_obscureShowCharTicksPending = 0;
}
}
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.
I think you're right and the comment should remain, but should say _stopCursorBlink.
(Triage): @suragch Do you have plans to follow up on the feedback given above? |
Addresses these comments: - flutter#120265 (comment) - flutter#120265 (comment)
@goderbauer followup on feedback finished |
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
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! Thank you!
The method
_stopCursorTimer
no longer exists. The comment line that mentions it is now misleading.Alternatively, replace the comment with the following:
Because it appears that
_stopCursorBlink
also resets_cursorActive
.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.