From 99bb2b1d981abbe20fbc77b92b1d325082260514 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 21 Mar 2025 15:02:54 +0530 Subject: [PATCH 01/16] [docs] Add a misc FAQ page --- docs/docs/.vitepress/sidebar.ts | 1 + docs/docs/photos/faq/misc.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docs/docs/photos/faq/misc.md diff --git a/docs/docs/.vitepress/sidebar.ts b/docs/docs/.vitepress/sidebar.ts index 7e25c3c132..d7c0c20d5d 100644 --- a/docs/docs/.vitepress/sidebar.ts +++ b/docs/docs/.vitepress/sidebar.ts @@ -142,6 +142,7 @@ export const sidebar = [ text: "Video streaming", link: "/photos/faq/video-streaming", }, + { text: "Misc", link: "/photos/faq/misc" }, ], }, { diff --git a/docs/docs/photos/faq/misc.md b/docs/docs/photos/faq/misc.md new file mode 100644 index 0000000000..11f007608c --- /dev/null +++ b/docs/docs/photos/faq/misc.md @@ -0,0 +1,22 @@ +--- +title: General FAQ +description: Unsorted frequently asked questions about Ente Photos +--- + +# Miscellaneous FAQ + +## Exif Description + +Ente will try to read as much information from Exif when the image is uploaded, +but after that, only the fields which have been parsed into Ente can be +searched. + +The app still show all the fields in the raw Exif data in the file info panel +when someone taps on the "View all Exif" option, but otherwise the app is +unaware of these fields. + +In particular, for the description associated with a photo, the exact logic to +determine the description from the Exif when uploading the image can be seen [in +this part of the +code](https://github.com/ente-io/ente/blob/0dcb185744da469848b41b668fe4b647226b6fe2/web/packages/gallery/services/exif.ts#L609-L620). + From d84bdb645b3060ea1268399af7cefe6d97231022 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 21 Mar 2025 15:04:05 +0530 Subject: [PATCH 02/16] Title --- docs/docs/photos/faq/misc.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/docs/photos/faq/misc.md b/docs/docs/photos/faq/misc.md index 11f007608c..79549c9954 100644 --- a/docs/docs/photos/faq/misc.md +++ b/docs/docs/photos/faq/misc.md @@ -1,5 +1,5 @@ --- -title: General FAQ +title: Miscellaneous general FAQ description: Unsorted frequently asked questions about Ente Photos --- @@ -16,7 +16,5 @@ when someone taps on the "View all Exif" option, but otherwise the app is unaware of these fields. In particular, for the description associated with a photo, the exact logic to -determine the description from the Exif when uploading the image can be seen [in -this part of the -code](https://github.com/ente-io/ente/blob/0dcb185744da469848b41b668fe4b647226b6fe2/web/packages/gallery/services/exif.ts#L609-L620). - +determine the description from the Exif when uploading the image can be seen +[in this part of the code](https://github.com/ente-io/ente/blob/0dcb185744da469848b41b668fe4b647226b6fe2/web/packages/gallery/services/exif.ts#L609-L620). From 4f6eff10347fc462c6f6932ddd0c9761517b4c77 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 16:38:46 +0530 Subject: [PATCH 03/16] fix(memory-widget): remove filler as a title and use years ago instead --- .../services/memory_home_widget_service.dart | 16 ++++++------- .../lib/services/smart_memories_service.dart | 8 +++++++ .../ui/home/memories/memory_cover_widget.dart | 24 +++++++------------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/mobile/lib/services/memory_home_widget_service.dart b/mobile/lib/services/memory_home_widget_service.dart index 7e24bed4a6..fe293cb28d 100644 --- a/mobile/lib/services/memory_home_widget_service.dart +++ b/mobile/lib/services/memory_home_widget_service.dart @@ -4,6 +4,7 @@ import "package:logging/logging.dart"; import "package:photos/models/file/file.dart"; import "package:photos/service_locator.dart"; import "package:photos/services/home_widget_service.dart"; +import "package:photos/services/smart_memories_service.dart"; import "package:photos/services/sync/local_sync_service.dart"; import "package:shared_preferences/shared_preferences.dart"; import "package:synchronized/synchronized.dart"; @@ -137,14 +138,13 @@ class MemoryHomeWidgetService { if (memories.isEmpty) { return {}; } - - // flatten the memories to a list of files and take first 50 - final files = memories.take(50).toList().asMap().map( - (k, v) => MapEntry( - v.title, - v.memories.map((e) => e.file), - ), - ); + final files = Map.fromEntries( + memories.map((m) { + var title = m.title != "filler" ? m.title : null; + title ??= SmartMemoriesService.getTitle(m.memories.firstOrNull?.file); + return MapEntry(m.title, m.memories.map((e) => e.file).toList()); + }).take(50), + ); return files; } diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 5234f1afca..aa95a90f3a 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -1534,6 +1534,14 @@ class SmartMemoriesService { return memoryResults; } + static String getTitle(EnteFile? file) { + if (file == null) return ''; + final present = DateTime.now(); + final then = DateTime.fromMicrosecondsSinceEpoch(file.creationTime!); + final diffInYears = present.year - then.year; + return S.current.yearsAgo(diffInYears); + } + static String getDateFormatted({ required int creationTime, BuildContext? context, diff --git a/mobile/lib/ui/home/memories/memory_cover_widget.dart b/mobile/lib/ui/home/memories/memory_cover_widget.dart index 5e5b9c96a2..edcb065f44 100644 --- a/mobile/lib/ui/home/memories/memory_cover_widget.dart +++ b/mobile/lib/ui/home/memories/memory_cover_widget.dart @@ -1,7 +1,7 @@ import "package:flutter/material.dart"; import "package:flutter/scheduler.dart"; -import "package:photos/generated/l10n.dart"; import "package:photos/models/memories/memory.dart"; +import "package:photos/services/smart_memories_service.dart"; import "package:photos/theme/colors.dart"; import "package:photos/theme/effects.dart"; import "package:photos/theme/ente_theme.dart"; @@ -47,11 +47,10 @@ class _MemoryCoverWidgetState extends State { final widthOfScreen = MediaQuery.sizeOf(context).width; final index = _getNextMemoryIndex(); - final title = widget.title != null - ? widget.title! == "filler" - ? _getTitle(widget.memories[index]) - : widget.title! - : _getTitle(widget.memories[index]); + String? title = widget.title != null && widget.title! != "filler" + ? widget.title! + : null; + title ??= SmartMemoriesService.getTitle(widget.memories[index].file); final memory = widget.memories[index]; final isSeen = memory.isSeen(); final brightness = @@ -74,7 +73,7 @@ class _MemoryCoverWidgetState extends State { FullScreenMemoryDataUpdater( initialIndex: index, memories: widget.memories, - child: FullScreenMemory(title, index), + child: FullScreenMemory(title!, index), ), forceCustomPageRoute: true, ); @@ -136,7 +135,7 @@ class _MemoryCoverWidgetState extends State { horizontal: 8.0, ), child: Hero( - tag: title, + tag: title!, child: Center( child: Text( title, @@ -187,7 +186,7 @@ class _MemoryCoverWidgetState extends State { horizontal: 8.0, ), child: Hero( - tag: title, + tag: title!, child: Center( child: Text( title, @@ -246,11 +245,4 @@ class _MemoryCoverWidgetState extends State { } return lastSeenIndex + 1; } - - String _getTitle(Memory memory) { - final present = DateTime.now(); - final then = DateTime.fromMicrosecondsSinceEpoch(memory.file.creationTime!); - final diffInYears = present.year - then.year; - return S.of(context).yearsAgo(diffInYears); - } } From a4141bb29685e656270368b5a7d111ba29d0c376 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Fri, 21 Mar 2025 16:45:56 +0530 Subject: [PATCH 04/16] Fix fillers showing filler when ML disabled --- mobile/lib/services/smart_memories_service.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 5234f1afca..1b47628262 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -315,6 +315,13 @@ class SmartMemoriesService { final seenTimes = await _memoriesDB.getSeenTimes(); final fillerMemories = await _getFillerResults(allFiles, now, seenTimes: seenTimes); + final local = await getLocale(); + final languageCode = local?.languageCode ?? "en"; + final s = await S.load(local!); + _logger.finest('get locale and S'); + for (final memory in fillerMemories) { + memory.title = memory.createTitle(s, languageCode); + } return fillerMemories; } From 45ef2b6976784553112acabe1d39a87be55b12e4 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Fri, 21 Mar 2025 16:46:11 +0530 Subject: [PATCH 05/16] Remove backup on memories widget --- mobile/lib/ui/home/memories/memory_cover_widget.dart | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mobile/lib/ui/home/memories/memory_cover_widget.dart b/mobile/lib/ui/home/memories/memory_cover_widget.dart index 5e5b9c96a2..747b8675b1 100644 --- a/mobile/lib/ui/home/memories/memory_cover_widget.dart +++ b/mobile/lib/ui/home/memories/memory_cover_widget.dart @@ -19,7 +19,7 @@ class MemoryCoverWidget extends StatefulWidget { static const aspectRatio = 0.68; static const horizontalPadding = 2.5; final double maxScaleOffsetX; - final String? title; + final String title; const MemoryCoverWidget({ required this.memories, @@ -28,7 +28,7 @@ class MemoryCoverWidget extends StatefulWidget { required this.maxHeight, required this.maxWidth, required this.maxScaleOffsetX, - this.title, + required this.title, super.key, }); @@ -47,11 +47,8 @@ class _MemoryCoverWidgetState extends State { final widthOfScreen = MediaQuery.sizeOf(context).width; final index = _getNextMemoryIndex(); - final title = widget.title != null - ? widget.title! == "filler" - ? _getTitle(widget.memories[index]) - : widget.title! - : _getTitle(widget.memories[index]); + final title = widget.title; + final memory = widget.memories[index]; final isSeen = memory.isSeen(); final brightness = From 916c748479fb6a3652d49594c4c0a3753923ec5e Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Fri, 21 Mar 2025 16:48:12 +0530 Subject: [PATCH 06/16] Clear internal flag in moments --- mobile/lib/services/search_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/lib/services/search_service.dart b/mobile/lib/services/search_service.dart index 1407e80958..b68a597916 100644 --- a/mobile/lib/services/search_service.dart +++ b/mobile/lib/services/search_service.dart @@ -1257,7 +1257,7 @@ class SearchService { searchResults.add( GenericSearchResult( ResultType.event, - memory.title, + memory.title + "(I)", files, hierarchicalSearchFilter: TopLevelGenericFilter( filterName: memory.title, From c597c2596cbcb54b3e21bdf8530aeb1c4605a083 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 16:52:16 +0530 Subject: [PATCH 07/16] feat(language): integrate LanguageService for localized titles and dates --- mobile/lib/services/home_widget_service.dart | 8 +++-- mobile/lib/services/language_service.dart | 16 ++++++++++ .../services/memory_home_widget_service.dart | 9 +++++- .../lib/services/smart_memories_service.dart | 29 +++++++++++++++---- .../ui/home/memories/memory_cover_widget.dart | 6 +++- 5 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 mobile/lib/services/language_service.dart diff --git a/mobile/lib/services/home_widget_service.dart b/mobile/lib/services/home_widget_service.dart index 0fc5d6d49c..8e11dfa574 100644 --- a/mobile/lib/services/home_widget_service.dart +++ b/mobile/lib/services/home_widget_service.dart @@ -101,11 +101,13 @@ class HomeWidgetService { await setData(key, path); + final subText = await SmartMemoriesService.getDateFormattedLocale( + creationTime: ogFile.creationTime!, + ); + final data = { "title": title, - "subText": SmartMemoriesService.getDateFormatted( - creationTime: ogFile.creationTime!, - ), + "subText": subText, "generatedId": ogFile.generatedID!, }; if (Platform.isIOS) { diff --git a/mobile/lib/services/language_service.dart b/mobile/lib/services/language_service.dart new file mode 100644 index 0000000000..a1a3a851a4 --- /dev/null +++ b/mobile/lib/services/language_service.dart @@ -0,0 +1,16 @@ +import "package:photos/generated/l10n.dart"; +import "package:photos/l10n/l10n.dart"; + +class LanguageService { + static Future get s async { + try { + return S.current; + } catch (_) {} + + final local = await getLocale(); + + final s = await S.load(local!); + + return s; + } +} diff --git a/mobile/lib/services/memory_home_widget_service.dart b/mobile/lib/services/memory_home_widget_service.dart index fe293cb28d..4cee60bb25 100644 --- a/mobile/lib/services/memory_home_widget_service.dart +++ b/mobile/lib/services/memory_home_widget_service.dart @@ -4,6 +4,7 @@ import "package:logging/logging.dart"; import "package:photos/models/file/file.dart"; import "package:photos/service_locator.dart"; import "package:photos/services/home_widget_service.dart"; +import "package:photos/services/language_service.dart"; import "package:photos/services/smart_memories_service.dart"; import "package:photos/services/sync/local_sync_service.dart"; import "package:shared_preferences/shared_preferences.dart"; @@ -138,10 +139,16 @@ class MemoryHomeWidgetService { if (memories.isEmpty) { return {}; } + + final s = await LanguageService.s; final files = Map.fromEntries( memories.map((m) { var title = m.title != "filler" ? m.title : null; - title ??= SmartMemoriesService.getTitle(m.memories.firstOrNull?.file); + + title ??= SmartMemoriesService.getTitle( + m.memories.firstOrNull?.file, + s, + ); return MapEntry(m.title, m.memories.map((e) => e.file).toList()); }).take(50), ); diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index aa95a90f3a..a170476218 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -31,6 +31,7 @@ import "package:photos/models/ml/face/face_with_embedding.dart"; import "package:photos/models/ml/face/person.dart"; import "package:photos/models/ml/vector.dart"; import "package:photos/service_locator.dart"; +import "package:photos/services/language_service.dart"; import "package:photos/services/location_service.dart"; import "package:photos/services/machine_learning/face_ml/person/person_service.dart"; import "package:photos/services/machine_learning/ml_computer.dart"; @@ -117,9 +118,10 @@ class SmartMemoriesService { } _logger.finest('clipPositiveTextVector and clipPeopleActivityVectors $t'); - final local = await getLocale(); - final languageCode = local?.languageCode ?? "en"; - final s = await S.load(local!); + final s = await LanguageService.s; + final locale = await getLocale(); + final languageCode = locale!.languageCode; + _logger.finest('get locale and S $t'); _logger.finest('all data fetched $t at ${DateTime.now()}, to computer'); @@ -1534,20 +1536,35 @@ class SmartMemoriesService { return memoryResults; } - static String getTitle(EnteFile? file) { + static String getTitle(EnteFile? file, S s) { if (file == null) return ''; final present = DateTime.now(); final then = DateTime.fromMicrosecondsSinceEpoch(file.creationTime!); final diffInYears = present.year - then.year; - return S.current.yearsAgo(diffInYears); + + return s.yearsAgo(diffInYears); + } + + static Future getDateFormattedLocale({ + required int creationTime, + }) async { + final locale = await getLocale(); + + return getDateFormatted( + creationTime: creationTime, + languageCode: locale!.languageCode, + ); } static String getDateFormatted({ required int creationTime, BuildContext? context, + String? languageCode, }) { return DateFormat.yMMMd( - context != null ? Localizations.localeOf(context).languageCode : "en", + context != null + ? Localizations.localeOf(context).languageCode + : languageCode ?? "en", ).format( DateTime.fromMicrosecondsSinceEpoch(creationTime), ); diff --git a/mobile/lib/ui/home/memories/memory_cover_widget.dart b/mobile/lib/ui/home/memories/memory_cover_widget.dart index edcb065f44..119822e646 100644 --- a/mobile/lib/ui/home/memories/memory_cover_widget.dart +++ b/mobile/lib/ui/home/memories/memory_cover_widget.dart @@ -1,5 +1,6 @@ import "package:flutter/material.dart"; import "package:flutter/scheduler.dart"; +import "package:photos/generated/l10n.dart"; import "package:photos/models/memories/memory.dart"; import "package:photos/services/smart_memories_service.dart"; import "package:photos/theme/colors.dart"; @@ -50,7 +51,10 @@ class _MemoryCoverWidgetState extends State { String? title = widget.title != null && widget.title! != "filler" ? widget.title! : null; - title ??= SmartMemoriesService.getTitle(widget.memories[index].file); + title ??= SmartMemoriesService.getTitle( + widget.memories[index].file, + S.of(context), + ); final memory = widget.memories[index]; final isSeen = memory.isSeen(); final brightness = From 5a524fa5b016aa90e9274388359774105e5ac60b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 21 Mar 2025 16:56:25 +0530 Subject: [PATCH 08/16] Fix viewer close on deletion of last file --- web/packages/gallery/components/viewer/FileViewer.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/packages/gallery/components/viewer/FileViewer.tsx b/web/packages/gallery/components/viewer/FileViewer.tsx index 643eb620bf..2c16dd77be 100644 --- a/web/packages/gallery/components/viewer/FileViewer.tsx +++ b/web/packages/gallery/components/viewer/FileViewer.tsx @@ -827,8 +827,10 @@ export const FileViewer: React.FC = ({ }, [handleClose, files]); useEffect(() => { - psRef.current?.refreshCurrentSlideFavoriteButtonIfNeeded(); - }, [favoriteFileIDs, pendingFavoriteUpdates]); + if (open) { + psRef.current?.refreshCurrentSlideFavoriteButtonIfNeeded(); + } + }, [favoriteFileIDs, pendingFavoriteUpdates, open]); useEffect(() => { if (open) { @@ -840,7 +842,9 @@ export const FileViewer: React.FC = ({ disableDownload, haveUser, delegate: delegateRef.current!, - onClose: handleClose, + onClose: () => { + if (psRef.current) handleClose(); + }, onAnnotate: handleAnnotate, onViewInfo: handleViewInfo, onDownload: handleDownloadBarAction, From a4ab3168ad2c4d9c0ff764ae511ae3df7cbf308b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 21 Mar 2025 16:59:10 +0530 Subject: [PATCH 09/16] Add note --- server/compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/compose.yaml b/server/compose.yaml index eb05b889a5..1def7f528e 100644 --- a/server/compose.yaml +++ b/server/compose.yaml @@ -73,6 +73,8 @@ services: configs: credentials_yaml: + # You'll need to recreate the containers (docker compose down && docker + # compose up) when changing this inline config for the changes to apply. content: | db: host: postgres From 1440c7e07ab0e5b0774bddec1f57d3e123bfee87 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:00:43 +0530 Subject: [PATCH 10/16] chore: remove getTitle --- mobile/lib/services/memory_home_widget_service.dart | 9 --------- mobile/lib/services/smart_memories_service.dart | 9 --------- 2 files changed, 18 deletions(-) diff --git a/mobile/lib/services/memory_home_widget_service.dart b/mobile/lib/services/memory_home_widget_service.dart index 4cee60bb25..04b54afe1b 100644 --- a/mobile/lib/services/memory_home_widget_service.dart +++ b/mobile/lib/services/memory_home_widget_service.dart @@ -4,8 +4,6 @@ import "package:logging/logging.dart"; import "package:photos/models/file/file.dart"; import "package:photos/service_locator.dart"; import "package:photos/services/home_widget_service.dart"; -import "package:photos/services/language_service.dart"; -import "package:photos/services/smart_memories_service.dart"; import "package:photos/services/sync/local_sync_service.dart"; import "package:shared_preferences/shared_preferences.dart"; import "package:synchronized/synchronized.dart"; @@ -140,15 +138,8 @@ class MemoryHomeWidgetService { return {}; } - final s = await LanguageService.s; final files = Map.fromEntries( memories.map((m) { - var title = m.title != "filler" ? m.title : null; - - title ??= SmartMemoriesService.getTitle( - m.memories.firstOrNull?.file, - s, - ); return MapEntry(m.title, m.memories.map((e) => e.file).toList()); }).take(50), ); diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index f31dd08566..1d53ae5633 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -1543,15 +1543,6 @@ class SmartMemoriesService { return memoryResults; } - static String getTitle(EnteFile? file, S s) { - if (file == null) return ''; - final present = DateTime.now(); - final then = DateTime.fromMicrosecondsSinceEpoch(file.creationTime!); - final diffInYears = present.year - then.year; - - return s.yearsAgo(diffInYears); - } - static Future getDateFormattedLocale({ required int creationTime, }) async { From 648441983927a2e6a24e4133395f20c172b2aa05 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:02:35 +0530 Subject: [PATCH 11/16] fix: revert to original like --- mobile/lib/services/smart_memories_service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 1d53ae5633..76b8af76fb 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -118,9 +118,9 @@ class SmartMemoriesService { } _logger.finest('clipPositiveTextVector and clipPeopleActivityVectors $t'); - final s = await LanguageService.s; final locale = await getLocale(); - final languageCode = locale!.languageCode; + final languageCode = locale?.languageCode ?? "en"; + final s = await LanguageService.s; _logger.finest('get locale and S $t'); From 4bdf879a50d330545ba0cbc55bc46e20ffb3bd70 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:02:58 +0530 Subject: [PATCH 12/16] refactor: rename variable 'locale' to 'local' for clarity --- mobile/lib/services/smart_memories_service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 76b8af76fb..601f07633c 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -118,8 +118,8 @@ class SmartMemoriesService { } _logger.finest('clipPositiveTextVector and clipPeopleActivityVectors $t'); - final locale = await getLocale(); - final languageCode = locale?.languageCode ?? "en"; + final local = await getLocale(); + final languageCode = local?.languageCode ?? "en"; final s = await LanguageService.s; _logger.finest('get locale and S $t'); From 36449939647f2312d70b40c33f6398a8e1882b27 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:04:00 +0530 Subject: [PATCH 13/16] refactor: replace S.load with LanguageService for localization --- mobile/lib/services/smart_memories_service.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart index 601f07633c..493fbd1a31 100644 --- a/mobile/lib/services/smart_memories_service.dart +++ b/mobile/lib/services/smart_memories_service.dart @@ -13,7 +13,6 @@ import "package:photos/core/constants.dart"; import "package:photos/db/memories_db.dart"; import "package:photos/db/ml/db.dart"; import "package:photos/extensions/stop_watch.dart"; -import "package:photos/generated/l10n.dart"; import "package:photos/l10n/l10n.dart"; import "package:photos/models/base_location.dart"; import "package:photos/models/file/file.dart"; @@ -317,9 +316,11 @@ class SmartMemoriesService { final seenTimes = await _memoriesDB.getSeenTimes(); final fillerMemories = await _getFillerResults(allFiles, now, seenTimes: seenTimes); + final local = await getLocale(); final languageCode = local?.languageCode ?? "en"; - final s = await S.load(local!); + final s = await LanguageService.s; + _logger.finest('get locale and S'); for (final memory in fillerMemories) { memory.title = memory.createTitle(s, languageCode); From fa8839607283a57ce656cb6a257a32503b8c01e2 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:09:10 +0530 Subject: [PATCH 14/16] fix: check for blockers inside lock as well --- mobile/lib/services/memory_home_widget_service.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/lib/services/memory_home_widget_service.dart b/mobile/lib/services/memory_home_widget_service.dart index 04b54afe1b..d40b8fb1a3 100644 --- a/mobile/lib/services/memory_home_widget_service.dart +++ b/mobile/lib/services/memory_home_widget_service.dart @@ -68,6 +68,10 @@ class MemoryHomeWidgetService { } await _memoryForceRefreshLock.synchronized(() async { + final result = await hasAnyBlockers(); + if (result) { + return; + } final isTotalEmpty = await _checkIfTotalEmpty(); forceFetchNewMemories ??= await getForceFetchCondition(isTotalEmpty); From e430d4a47d067966856ac6d409858ea20b725aad Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 21 Mar 2025 17:12:48 +0530 Subject: [PATCH 15/16] chore: bump version number --- mobile/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index d034c1cc2e..3ad966b2c0 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1030 +version: 1.0.0+1031 publish_to: none environment: From 803d36c915fbbf5b903079ad9aba0da95a4f01d7 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Fri, 21 Mar 2025 20:26:04 +0530 Subject: [PATCH 16/16] Add callout --- server/docs/quickstart.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/docs/quickstart.md b/server/docs/quickstart.md index a24720b7c1..9e9760c8f3 100644 --- a/server/docs/quickstart.md +++ b/server/docs/quickstart.md @@ -91,7 +91,13 @@ docker compose down ``` Apart from this `my-ente` directory, the script does not install anything else -on your system. All persistent data is saved in volumes managed by Docker. +on your system. Settings and credentials are saved in `my-ente`, while other +persistent data is saved in volumes managed by Docker. + +> [!IMPORTANT] +> +> The `museum.yaml` contains your (unique) autogenerated museum, DB and S3 +> credentials, without which the data on your volumes will not be accessible. > [!CAUTION] >