fix: применять доверие корню Минцифры после setPrefix

SharedPreferences.setPrefix кидает StateError, если инстанс уже создан, а
applyMincifryTrust читал настройки до него — именованные инстансы падали на
старте. Заодно флаг теперь читается из области настроек своего инстанса.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01795oYor2EJwaM7gYpDrgTH
This commit is contained in:
klockky
2026-08-06 13:17:40 +03:00
co-authored by Claude Opus 5
parent ed33f53c6a
commit 81159bac60
+1 -1
View File
@@ -174,7 +174,6 @@ void _installLogCapture() {
void main(List<String> args) async { void main(List<String> args) async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await initKolibri(); await initKolibri();
await TlsConfig.applyMincifryTrust();
DebugTest.parse(args); DebugTest.parse(args);
_installLogCapture(); _installLogCapture();
VideoPlayerMediaKit.ensureInitialized( VideoPlayerMediaKit.ensureInitialized(
@@ -185,6 +184,7 @@ void main(List<String> args) async {
if (AppInstance.isNamed) { if (AppInstance.isNamed) {
SharedPreferences.setPrefix('flutter.${AppInstance.id}.'); SharedPreferences.setPrefix('flutter.${AppInstance.id}.');
} }
await TlsConfig.applyMincifryTrust();
await AppDatabase.init(); await AppDatabase.init();
final activeAccountId = await TokenStorage.getActiveAccountId(); final activeAccountId = await TokenStorage.getActiveAccountId();
if (activeAccountId != null) { if (activeAccountId != null) {