Erweiterungen

This commit is contained in:
Sven committed 2024-06-21 13:34:43 +02:00
1 parent 85e973c3dd
commit fbdd2a4338
14 files changed
+296 -116

No files matched your search

+12 -1
View File
@@ -56,7 +56,9 @@ Future<void> main() async {
Future<void> _clearLog() async {
var dateTime = DateTime.now().add(const Duration(days: -7));
await MyApp.isarInstance.logEntrys.where().filter().timeLessThan(dateTime).deleteAll();
await MyApp.isarInstance.writeTxn(() async {
await MyApp.isarInstance.logEntrys.where().filter().timeLessThan(dateTime).deleteAll();
});
}
void _traceUncaughtExceptions(Object error, StackTrace stackTrace) {
@@ -342,6 +344,13 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin {
}
void _initMessages() {
MessageService().unsubscribe(Constants.messageTopicPushContentView, this);
MessageService().unsubscribe(Constants.messageTopicPopContentView, this);
MessageService().unsubscribe(Constants.messageTopicReplaceContentView, this);
MessageService().unsubscribe(Constants.messageTopicHideRightButton, this);
MessageService().unsubscribe(Constants.messageTopicConnectionStatusChanged, this);
MessageService().unsubscribe(Constants.messageTopicJobReceived, this);
MessageService().subscribe<ContentViewWidget>(Constants.messageTopicPushContentView, this, (ContentViewWidget widget) {
_pushContentView(widget);
});
@@ -441,6 +450,8 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin {
}
void _connectionStatusChanged(ConnectionStatus connectionStatus) {
Util.logInfo("_connectionStatusChanged called: $connectionStatus");
_connectionLostValueNotifier.value = connectionStatus.status == ConnectionStatusEnum.notConnected;
}