From 726297316309c992835fe895aa159f7fef8690f6 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 14 Nov 2023 11:12:39 +0200 Subject: [PATCH] Fix for sentry errors --- lib/constants.dart | 2 +- lib/ui/app/live_text.dart | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/constants.dart b/lib/constants.dart index 0493d40479d..4604c6c18d0 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -8,7 +8,7 @@ const String kClientVersion = '5.0.140'; const String kMinServerVersion = '5.0.4'; const String kAppName = 'Invoice Ninja'; -const String kSiteUrl = 'https://invoiceninja.com/'; +const String kSiteUrl = 'https://invoiceninja.com'; const String kAppProductionUrl = 'https://invoicing.co'; const String kAppStagingUrl = 'https://staging.invoicing.co'; const String kAppStagingNetUrl = 'https://invoiceninja.net'; diff --git a/lib/ui/app/live_text.dart b/lib/ui/app/live_text.dart index 77acc281692..690734734e2 100644 --- a/lib/ui/app/live_text.dart +++ b/lib/ui/app/live_text.dart @@ -3,6 +3,7 @@ import 'dart:async'; // Flutter imports: import 'package:flutter/widgets.dart'; +import 'package:invoiceninja_flutter/utils/platforms.dart'; import 'package:window_manager/window_manager.dart'; class LiveText extends StatefulWidget { @@ -29,11 +30,13 @@ class _LiveTextState extends State { void initState() { super.initState(); _timer = Timer.periodic( - widget.duration ?? Duration(milliseconds: 100), + widget.duration ?? Duration(milliseconds: 500), (Timer timer) async { - final isFocused = await windowManager.isFocused(); - if (!isFocused) { - return; + if (isDesktopOS()) { + final isFocused = await windowManager.isFocused(); + if (!isFocused) { + return; + } } if (mounted) {