mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-12 09:32:33 +00:00
Make coolDownDuration private
This commit is contained in:
parent
8a45cb4dc7
commit
51a11d0bc2
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||
|
||||
class ExceptionHandler {
|
||||
static bool _hasError = false;
|
||||
static const coolDownDurationInDays = 7;
|
||||
static const _coolDownDurationInDays = 7;
|
||||
|
||||
static void _saveException(String? error, StackTrace? stackTrace) async {
|
||||
final appDocDir = await getApplicationDocumentsDirectory();
|
||||
|
@ -78,11 +78,11 @@ class ExceptionHandler {
|
|||
|
||||
final lastPopupDate =
|
||||
DateTime.tryParse(sharedPrefs.getString(PreferencesKey.lastPopupDate) ?? '') ??
|
||||
DateTime.now().subtract(Duration(days: coolDownDurationInDays + 1));
|
||||
DateTime.now().subtract(Duration(days: _coolDownDurationInDays + 1));
|
||||
|
||||
final durationSinceLastReport = DateTime.now().difference(lastPopupDate).inDays;
|
||||
|
||||
if (_hasError || durationSinceLastReport < coolDownDurationInDays) {
|
||||
if (_hasError || durationSinceLastReport < _coolDownDurationInDays) {
|
||||
return;
|
||||
}
|
||||
_hasError = true;
|
||||
|
|
Loading…
Reference in a new issue