onContinuationResponse method
Handles an continuation response from the server
Implementation
Future onContinuationResponse(ImapResponse imapResponse) async {
final cmd = _currentCommandTask?.command;
if (cmd != null) {
final response = cmd.getContinuationResponse(imapResponse);
if (response != null) {
await writeText(response);
return;
}
}
if (_isInIdleMode) {
// `+ idling` from the server -- IDLE mode is now truly active.
// Resolve any pending completer from
// idleStart(waitForContinuation: true).
final completer = _idleContinuationCompleter;
if (completer != null && !completer.isCompleted) {
_idleContinuationCompleter = null;
completer.complete();
}
return;
}
logApp('continuation not handled: [$imapResponse], current cmd: $cmd');
}