Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Merge remote-tracking branch 'origin/main' into album

AmanRajSinghMouryade33788319b5
diff --cc mobile/apps/photos/lib/states/all_sections_examples_state.dart
index d0a6ad676b,b455d634ab..5bf49b59b7
--- a/mobile/apps/photos/lib/states/all_sections_examples_state.dart
+++ b/mobile/apps/photos/lib/states/all_sections_examples_state.dart
@@@ -104,13 -120,13 +120,14 @@@ class _AllSectionsExamplesProviderStat
setState(() {
_logger.info("'_debounceTimer: reloading all sections in search tab");
final allSectionsExamples = <Future<List<SearchResult>>>[];
+ final hasAnySearchableFilesFuture =
+ SearchService.instance.hasAnyFilesForSearch();
for (SectionType sectionType in SectionType.values) {
- // Contacts section have been moved to shared collections tab
- // temporarily from search tab. Albums are also not shown in the
- // search tab. So we can skip computing data here since
- // 'allSectionsExamples' is for search tab sections only.
- // Contacts section has been moved to shared collections tab.
- // File types are rendered as lazy placeholders in the search tab.
++ // Contacts moved to shared, albums moved to the Albums tab, and file
++ // types render as a lazy placeholder in Search.
if (sectionType == SectionType.contacts ||
- sectionType == SectionType.album) {
++ sectionType == SectionType.album ||
+ sectionType == SectionType.fileTypesAndExtension) {
allSectionsExamples.add(Future.value([]));
} else {
allSectionsExamples.add(
diff --cc mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
index e59b496633,991926ce3e..769186d292
--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
@@@ -214,13 -214,13 +214,13 @@@ class _ImageEditorPageState extends Sta
hideToolbarOnInteraction: false,
),
theme: ThemeData(
- scaffoldBackgroundColor: colorScheme.backgroundBase,
+ scaffoldBackgroundColor: colorScheme.backgroundColour,
appBarTheme: AppBarTheme(
titleTextStyle: textTheme.body,
- backgroundColor: colorScheme.backgroundBase,
+ backgroundColor: colorScheme.backgroundColour,
),
- bottomAppBarTheme: BottomAppBarTheme(
+ bottomAppBarTheme: BottomAppBarThemeData(
- color: colorScheme.backgroundBase,
+ color: colorScheme.backgroundColour,
),
brightness: isLightMode ? Brightness.light : Brightness.dark,
),
diff --cc mobile/apps/photos/lib/ui/viewer/search/result/contact_photo_adjust_page.dart
index e2702596b1,0bada53ae6..9808fc2a15
--- a/mobile/apps/photos/lib/ui/viewer/search/result/contact_photo_adjust_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/result/contact_photo_adjust_page.dart
@@@ -32,13 -32,13 +32,13 @@@ class _ContactPhotoAdjustPageState exte
widget.imageBytes,
initConfigs: CropRotateEditorInitConfigs(
theme: ThemeData(
- scaffoldBackgroundColor: colorScheme.backgroundBase,
+ scaffoldBackgroundColor: colorScheme.backgroundColour,
appBarTheme: AppBarTheme(
titleTextStyle: textTheme.body,
- backgroundColor: colorScheme.backgroundBase,
+ backgroundColor: colorScheme.backgroundColour,
),
- bottomAppBarTheme: BottomAppBarTheme(
+ bottomAppBarTheme: BottomAppBarThemeData(
- color: colorScheme.backgroundBase,
+ color: colorScheme.backgroundColour,
),
brightness: isLightMode ? Brightness.light : Brightness.dark,
),
diff --cc mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
index a2cbc96104,ef4a6ffe43..3527a2dbfe
--- a/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/search_tab.dart
@@@ -4,9 -4,9 +4,8 @@@ import "package:flutter/material.dart"
import "package:flutter_animate/flutter_animate.dart";
import "package:logging/logging.dart";
import "package:photos/generated/intl/app_localizations.dart";
-import "package:photos/models/search/album_search_result.dart";
import "package:photos/models/search/generic_search_result.dart";
import "package:photos/models/search/index_of_indexed_stack.dart";
- import "package:photos/models/search/search_result.dart";
import "package:photos/models/search/search_types.dart";
import "package:photos/service_locator.dart";
import "package:photos/services/wrapped/wrapped_service.dart";
@@@ -111,8 -113,16 +110,13 @@@ class _AllSearchSectionsState extends S
context,
).allSectionsExamplesFuture,
builder: (context, snapshot) {
- if (snapshot.hasData && snapshot.data!.isNotEmpty) {
- if (snapshot.data!.every((element) => element.isEmpty)) {
+ if (snapshot.hasData &&
+ snapshot.data!.sectionResults.isNotEmpty) {
+ final sectionResultsByType = snapshot.data!.sectionResults;
+ final hasAnySearchableFiles =
+ snapshot.data!.hasAnySearchableFiles;
- // In offline mode, skip the empty state check since DeviceAlbumsSection
- // fetches its own data and may have albums to show
- if (!isLocalGalleryMode &&
- !hasAnySearchableFiles &&
++ if (!hasAnySearchableFiles &&
+ sectionResultsByType.every((element) => element.isEmpty)) {
return const Padding(
padding: EdgeInsets.only(bottom: 72),
child: SearchTabEmptyState(),