web only decode the latest image (#9689)

1. web only decode the latest image
2. web/ios remove relay server config when import

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-10-18 08:45:16 +08:00 committed by GitHub
parent defb3e6c73
commit 53d11e99d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View file

@ -3177,6 +3177,9 @@ importConfig(List<TextEditingController>? controllers, List<RxString>? errMsgs,
if (text != null && text.isNotEmpty) {
try {
final sc = ServerConfig.decode(text);
if (isWeb || isIOS) {
sc.relayServer = '';
}
if (sc.idServer.isNotEmpty) {
Future<bool> success = setServerConfig(controllers, errMsgs, sc);
success.then((value) {