mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-25 15:35:29 -04:00
Fix getting stuck on splash screen when veilid is already started
This commit is contained in:
parent
f4407e5284
commit
746e5ccc64
1 changed files with 15 additions and 2 deletions
|
@ -44,8 +44,21 @@ class ProcessorRepository {
|
||||||
|
|
||||||
log.info('Veilid version: $veilidVersion');
|
log.info('Veilid version: $veilidVersion');
|
||||||
|
|
||||||
final updateStream = await Veilid.instance
|
Stream<VeilidUpdate> updateStream;
|
||||||
|
|
||||||
|
try {
|
||||||
|
log.debug('Starting VeilidCore');
|
||||||
|
updateStream = await Veilid.instance
|
||||||
.startupVeilidCore(await getVeilidConfig(kIsWeb, VeilidChatApp.name));
|
.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) {
|
_updateSubscription = updateStream.listen((update) {
|
||||||
if (update is VeilidLog) {
|
if (update is VeilidLog) {
|
||||||
processLog(update);
|
processLog(update);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue