Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid confusion on empty widget settings pages

ashilkn9069975bf0dc
diff --git a/mobile/lib/ui/settings/widgets/albums_widget_settings.dart b/mobile/lib/ui/settings/widgets/albums_widget_settings.dart
index cbf250986e..76aafb7c7c 100644
--- a/mobile/lib/ui/settings/widgets/albums_widget_settings.dart
+++ b/mobile/lib/ui/settings/widgets/albums_widget_settings.dart
@@ -6,7 +6,6 @@ import "package:photos/models/selected_albums.dart";
import "package:photos/services/album_home_widget_service.dart";
import "package:photos/services/collections_service.dart";
import "package:photos/services/favorites_service.dart";
-import 'package:photos/theme/ente_theme.dart';
import "package:photos/ui/collections/flex_grid_view.dart";
import "package:photos/ui/common/loading_widget.dart";
import "package:photos/ui/components/buttons/button_widget.dart";
@@ -85,7 +84,6 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
@override
Widget build(BuildContext context) {
- final textTheme = getEnteTextTheme(context);
return Scaffold(
bottomNavigationBar: hasInstalledAny
? Padding(
@@ -122,7 +120,9 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
title: S.of(context).albums,
),
expandedHeight: 120,
- flexibleSpaceCaption: S.of(context).albumsWidgetDesc,
+ flexibleSpaceCaption: hasInstalledAny
+ ? S.of(context).albumsWidgetDesc
+ : "Add an album widget to your homescreen and come back here to customize",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -150,12 +150,6 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
"assets/albums-widget-static.png",
height: 160,
),
- const SizedBox(height: 20),
- Text(
- "Add an album widget to your homescreen and come back here to customize",
- style: textTheme.smallFaint,
- textAlign: TextAlign.center,
- ),
],
),
),
diff --git a/mobile/lib/ui/settings/widgets/memories_widget_settings.dart b/mobile/lib/ui/settings/widgets/memories_widget_settings.dart
index 542e7b6ea5..8306a47c62 100644
--- a/mobile/lib/ui/settings/widgets/memories_widget_settings.dart
+++ b/mobile/lib/ui/settings/widgets/memories_widget_settings.dart
@@ -88,7 +88,6 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
@override
Widget build(BuildContext context) {
- final textTheme = getEnteTextTheme(context);
final colorScheme = getEnteColorScheme(context);
return Scaffold(
@@ -100,7 +99,9 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
title: S.of(context).memories,
),
expandedHeight: 120,
- flexibleSpaceCaption: S.of(context).memoriesWidgetDesc,
+ flexibleSpaceCaption: hasInstalledAny
+ ? S.of(context).memoriesWidgetDesc
+ : "Add a memories widget to your homescreen and come back here to customize",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -128,12 +129,6 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
"assets/memories-widget-static.png",
height: 160,
),
- const SizedBox(height: 20),
- Text(
- "Add a memories widget to your homescreen and come back here to customize",
- style: textTheme.smallFaint,
- textAlign: TextAlign.center,
- ),
],
),
),
diff --git a/mobile/lib/ui/settings/widgets/people_widget_settings.dart b/mobile/lib/ui/settings/widgets/people_widget_settings.dart
index d420ebfba5..c77b1ed2e9 100644
--- a/mobile/lib/ui/settings/widgets/people_widget_settings.dart
+++ b/mobile/lib/ui/settings/widgets/people_widget_settings.dart
@@ -94,7 +94,9 @@ class _PeopleWidgetSettingsState extends State<PeopleWidgetSettings> {
title: S.of(context).people,
),
expandedHeight: 120,
- flexibleSpaceCaption: S.of(context).peopleWidgetDesc,
+ flexibleSpaceCaption: hasInstalledAny
+ ? S.of(context).peopleWidgetDesc
+ : "Add a people widget to your homescreen and come back here to customize.",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -122,12 +124,6 @@ class _PeopleWidgetSettingsState extends State<PeopleWidgetSettings> {
"assets/people-widget-static.png",
height: 160,
),
- const SizedBox(height: 20),
- Text(
- "Add a people widget to your homescreen and come back here to customize",
- style: textTheme.smallFaint,
- textAlign: TextAlign.center,
- ),
],
),
),