mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-04-18 22:46:03 -04:00
Fix getting stuck on splash screen when veilid is already started
This commit is contained in:
parent
f4407e5284
commit
746e5ccc64
@ -44,8 +44,21 @@ class ProcessorRepository {
|
||||
|
||||
log.info('Veilid version: $veilidVersion');
|
||||
|
||||
final updateStream = await Veilid.instance
|
||||
.startupVeilidCore(await getVeilidConfig(kIsWeb, VeilidChatApp.name));
|
||||
Stream<VeilidUpdate> updateStream;
|
||||
|
||||
try {
|
||||
log.debug('Starting VeilidCore');
|
||||
updateStream = await Veilid.instance
|
||||
.startupVeilidCore(await getVeilidConfig(kIsWeb, VeilidChatApp.name));
|
||||
} on VeilidAPIExceptionAlreadyInitialized catch (_) {
|
||||
log.debug(
|
||||
'VeilidCore is already started, shutting down and restarting...');
|
||||
startedUp = true;
|
||||
await shutdown();
|
||||
updateStream = await Veilid.instance
|
||||
.startupVeilidCore(await getVeilidConfig(kIsWeb, VeilidChatApp.name));
|
||||
}
|
||||
|
||||
_updateSubscription = updateStream.listen((update) {
|
||||
if (update is VeilidLog) {
|
||||
processLog(update);
|
||||
|
Loading…
x
Reference in New Issue
Block a user