revert changes for test
This commit is contained in:
@@ -178,7 +178,6 @@ Future<T> _init<T>(
|
|||||||
Future<T> Function() initializer, {
|
Future<T> Function() initializer, {
|
||||||
int? timeout,
|
int? timeout,
|
||||||
}) async {
|
}) async {
|
||||||
Logger.bootstrap.warning("$name starting seconds");
|
|
||||||
final stopWatch = Stopwatch()..start();
|
final stopWatch = Stopwatch()..start();
|
||||||
Logger.bootstrap.info("initializing [$name]");
|
Logger.bootstrap.info("initializing [$name]");
|
||||||
Future<T> func() => timeout != null
|
Future<T> func() => timeout != null
|
||||||
@@ -188,20 +187,13 @@ Future<T> _init<T>(
|
|||||||
final result = await func();
|
final result = await func();
|
||||||
Logger.bootstrap
|
Logger.bootstrap
|
||||||
.debug("[$name] initialized in ${stopWatch.elapsedMilliseconds}ms");
|
.debug("[$name] initialized in ${stopWatch.elapsedMilliseconds}ms");
|
||||||
|
|
||||||
Logger.bootstrap.warning("$name done successfully waiting 2 seconds");
|
|
||||||
await Future.delayed(Duration(seconds: 2));
|
|
||||||
return result;
|
return result;
|
||||||
} catch (e, stackTrace) {
|
} catch (e, stackTrace) {
|
||||||
Logger.bootstrap.error("[$name] error initializing", e, stackTrace);
|
Logger.bootstrap.error("[$name] error initializing", e, stackTrace);
|
||||||
Logger.bootstrap.warning("$name done with error waiting 2 seconds");
|
|
||||||
await Future.delayed(Duration(seconds: 2));
|
|
||||||
rethrow;
|
rethrow;
|
||||||
} finally {
|
} finally {
|
||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
}
|
}
|
||||||
Logger.bootstrap.warning("$name done with unknown state waiting 2 seconds");
|
|
||||||
await Future.delayed(Duration(seconds: 2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<T?> _safeInit<T>(
|
Future<T?> _safeInit<T>(
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ class DeepLinkNotifier extends _$DeepLinkNotifier
|
|||||||
with ProtocolListener, InfraLogger {
|
with ProtocolListener, InfraLogger {
|
||||||
@override
|
@override
|
||||||
Future<NewProfileLink?> build() async {
|
Future<NewProfileLink?> build() async {
|
||||||
// if (Platform.isLinux) return null;
|
if (Platform.isLinux) return null;
|
||||||
try {
|
|
||||||
for (final protocol in LinkParser.protocols) {
|
for (final protocol in LinkParser.protocols) {
|
||||||
await protocolHandler.register(protocol);
|
await protocolHandler.register(protocol);
|
||||||
}
|
}
|
||||||
@@ -29,9 +29,6 @@ class DeepLinkNotifier extends _$DeepLinkNotifier
|
|||||||
final link = LinkParser.deep(initialPayload);
|
final link = LinkParser.deep(initialPayload);
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
loggy.error("failed to init deeplink", e);
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,8 @@ part 'system_tray_notifier.g.dart';
|
|||||||
class SystemTrayNotifier extends _$SystemTrayNotifier with AppLogger {
|
class SystemTrayNotifier extends _$SystemTrayNotifier with AppLogger {
|
||||||
@override
|
@override
|
||||||
Future<void> build() async {
|
Future<void> build() async {
|
||||||
if (true) return;
|
|
||||||
if (!PlatformUtils.isDesktop) return;
|
if (!PlatformUtils.isDesktop) return;
|
||||||
try {
|
|
||||||
await trayManager.setIcon(
|
await trayManager.setIcon(
|
||||||
_trayIconPath,
|
_trayIconPath,
|
||||||
isTemplate: Platform.isMacOS,
|
isTemplate: Platform.isMacOS,
|
||||||
@@ -121,9 +120,6 @@ class SystemTrayNotifier extends _$SystemTrayNotifier with AppLogger {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await trayManager.setContextMenu(menu);
|
await trayManager.setContextMenu(menu);
|
||||||
} catch (e) {
|
|
||||||
loggy.error("error updating system tray", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static String get _trayIconPath {
|
static String get _trayIconPath {
|
||||||
|
|||||||
Reference in New Issue
Block a user