Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into independent
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Sep 19, 2023
2 parents d4fdfd0 + 3ea327f commit f5737d7
Show file tree
Hide file tree
Showing 29 changed files with 1,124 additions and 862 deletions.
16 changes: 8 additions & 8 deletions lib/core/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Configuration {
"has_selected_all_folders_for_backup";
static const anonymousUserIDKey = "anonymous_user_id";

final kTempFolderDeletionTimeBuffer = const Duration(days: 1).inMicroseconds;
final kTempFolderDeletionTimeBuffer = const Duration(hours: 6).inMicroseconds;

static final _logger = Logger("Configuration");

Expand All @@ -77,7 +77,7 @@ class Configuration {
late SharedPreferences _preferences;
String? _secretKey;
late FlutterSecureStorage _secureStorage;
late String _tempDirectory;
late String _tempDocumentsDirPath;
late String _thumbnailCacheDirectory;

// 6th July 22: Remove this after 3 months. Hopefully, active users
Expand All @@ -96,14 +96,14 @@ class Configuration {
_preferences = await SharedPreferences.getInstance();
_secureStorage = const FlutterSecureStorage();
_documentsDirectory = (await getApplicationDocumentsDirectory()).path;
_tempDirectory = _documentsDirectory + "/temp/";
final tempDirectory = Directory(_tempDirectory);
_tempDocumentsDirPath = _documentsDirectory + "/temp/";
final tempDocumentsDir = Directory(_tempDocumentsDirPath);
try {
final currentTime = DateTime.now().microsecondsSinceEpoch;
if (tempDirectory.existsSync() &&
if (tempDocumentsDir.existsSync() &&
(_preferences.getInt(lastTempFolderClearTimeKey) ?? 0) <
(currentTime - kTempFolderDeletionTimeBuffer)) {
await tempDirectory.delete(recursive: true);
await tempDocumentsDir.delete(recursive: true);
await _preferences.setInt(lastTempFolderClearTimeKey, currentTime);
_logger.info("Cleared temp folder");
} else {
Expand All @@ -112,7 +112,7 @@ class Configuration {
} catch (e) {
_logger.warning(e);
}
tempDirectory.createSync(recursive: true);
tempDocumentsDir.createSync(recursive: true);
final tempDirectoryPath = (await getTemporaryDirectory()).path;
_thumbnailCacheDirectory = tempDirectoryPath + "/thumbnail-cache";
Directory(_thumbnailCacheDirectory).createSync(recursive: true);
Expand Down Expand Up @@ -499,7 +499,7 @@ class Configuration {

// Caution: This directory is cleared on app start
String getTempDirectory() {
return _tempDirectory;
return _tempDocumentsDirPath;
}

String getThumbnailCacheDirectory() {
Expand Down
1 change: 0 additions & 1 deletion lib/data/holidays.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Map<String, List<HolidayData>> localeToHolidays = {
HolidayData('Valentijnsdag', month: 2, day: 14), // Valentine's Day
HolidayData('Koningsdag', month: 4, day: 27), // King's Day
HolidayData('Bevrijdingsdag', month: 5, day: 5), // Liberation Day
HolidayData('Hemelvaartsdag', month: 5, day: 26), // Ascension Day
HolidayData('Halloween', month: 10, day: 31), // Halloween
HolidayData('Sinterklaas', month: 12, day: 5), // Sinterklaas
HolidayData('Eerste Kerstdag', month: 12, day: 25), // First Christmas Day
Expand Down
291 changes: 186 additions & 105 deletions lib/generated/intl/messages_de.dart

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions lib/generated/intl/messages_en.dart

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions lib/generated/intl/messages_es.dart

Large diffs are not rendered by default.

247 changes: 129 additions & 118 deletions lib/generated/intl/messages_fr.dart

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions lib/generated/intl/messages_it.dart

Large diffs are not rendered by default.

239 changes: 129 additions & 110 deletions lib/generated/intl/messages_nl.dart

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/generated/intl/messages_pl.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions lib/generated/intl/messages_pt.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f5737d7

Please sign in to comment.