Hides the SSL/TLS toggle in add/edit account screens when the host is not localhost; enforces SSL in connectImap/connectSmtp for non-localhost hosts so plaintext can never be configured accidentally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 lines
134 B
Dart
5 lines
134 B
Dart
bool isLocalhost(String host) {
|
|
final h = host.trim().toLowerCase();
|
|
return h == 'localhost' || h == '127.0.0.1' || h == '::1';
|
|
}
|