From 81159bac60bea8c3c9efe9d96d2191cd8fdec874 Mon Sep 17 00:00:00 2001 From: klockky Date: Thu, 6 Aug 2026 13:17:40 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=8F=D1=82=D1=8C=20=D0=B4=D0=BE=D0=B2=D0=B5=D1=80=D0=B8=D0=B5?= =?UTF-8?q?=20=D0=BA=D0=BE=D1=80=D0=BD=D1=8E=20=D0=9C=D0=B8=D0=BD=D1=86?= =?UTF-8?q?=D0=B8=D1=84=D1=80=D1=8B=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20set?= =?UTF-8?q?Prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SharedPreferences.setPrefix кидает StateError, если инстанс уже создан, а applyMincifryTrust читал настройки до него — именованные инстансы падали на старте. Заодно флаг теперь читается из области настроек своего инстанса. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01795oYor2EJwaM7gYpDrgTH --- lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 894da9f..4583cd7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -174,7 +174,6 @@ void _installLogCapture() { void main(List args) async { WidgetsFlutterBinding.ensureInitialized(); await initKolibri(); - await TlsConfig.applyMincifryTrust(); DebugTest.parse(args); _installLogCapture(); VideoPlayerMediaKit.ensureInitialized( @@ -185,6 +184,7 @@ void main(List args) async { if (AppInstance.isNamed) { SharedPreferences.setPrefix('flutter.${AppInstance.id}.'); } + await TlsConfig.applyMincifryTrust(); await AppDatabase.init(); final activeAccountId = await TokenStorage.getActiveAccountId(); if (activeAccountId != null) {