Skip to content

armgit / ente

Public Imported from GitHub
0

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

Rename Easter animation to Christmas banner

AmanRajSinghMourya82cf7f189689
diff --git a/mobile/apps/photos/lib/events/easter_animation_event.dart b/mobile/apps/photos/lib/events/christmas_banner_event.dart
similarity index 50%
rename from mobile/apps/photos/lib/events/easter_animation_event.dart
rename to mobile/apps/photos/lib/events/christmas_banner_event.dart
index c774cea51f..f5034fa5f1 100644
--- a/mobile/apps/photos/lib/events/easter_animation_event.dart
+++ b/mobile/apps/photos/lib/events/christmas_banner_event.dart
@@ -1,3 +1,3 @@
import 'package:photos/events/event.dart';
-class EasterAnimationEvent extends Event {}
+class ChristmasBannerEvent extends Event {}
diff --git a/mobile/apps/photos/lib/ui/home/christmas/christmas_utils.dart b/mobile/apps/photos/lib/ui/home/christmas/christmas_utils.dart
index 08a1cf9bc1..a8777d4302 100644
--- a/mobile/apps/photos/lib/ui/home/christmas/christmas_utils.dart
+++ b/mobile/apps/photos/lib/ui/home/christmas/christmas_utils.dart
@@ -1,9 +1,9 @@
import "package:photos/service_locator.dart";
/// Returns true if the current date is within the Christmas period (Dec 24-26)
-/// and the Easter animation setting is enabled.
+/// and the Christmas banner setting is enabled.
bool isChristmasPeriod() {
- if (!localSettings.isEasterAnimationEnabled) {
+ if (!localSettings.isChristmasBannerEnabled) {
return false;
}
final now = DateTime.now();
diff --git a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart b/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
index cf924bd058..52fb4f5eaf 100644
--- a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/status_bar_widget.dart
@@ -5,7 +5,7 @@ import "package:intl/intl.dart";
import "package:logging/logging.dart";
import 'package:photos/core/event_bus.dart';
import 'package:photos/ente_theme_data.dart';
-import 'package:photos/events/easter_animation_event.dart';
+import 'package:photos/events/christmas_banner_event.dart';
import 'package:photos/events/notification_event.dart';
import 'package:photos/events/sync_status_update_event.dart';
import "package:photos/generated/l10n.dart";
@@ -38,7 +38,7 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
late StreamSubscription<SyncStatusUpdate> _subscription;
late StreamSubscription<NotificationEvent> _notificationSubscription;
- late StreamSubscription<EasterAnimationEvent> _easterAnimationSubscription;
+ late StreamSubscription<ChristmasBannerEvent> _christmasBannerSubscription;
bool _isPausedDueToNetwork = false;
bool _showStatus = false;
bool _showErrorBanner = false;
@@ -86,8 +86,8 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
setState(() {});
}
});
- _easterAnimationSubscription =
- Bus.instance.on<EasterAnimationEvent>().listen((_) {
+ _christmasBannerSubscription =
+ Bus.instance.on<ChristmasBannerEvent>().listen((_) {
if (mounted) {
setState(() {});
}
@@ -100,7 +100,7 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
void dispose() {
_subscription.cancel();
_notificationSubscription.cancel();
- _easterAnimationSubscription.cancel();
+ _christmasBannerSubscription.cancel();
super.dispose();
}
diff --git a/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart b/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
index e11cf24a5f..9d42372057 100644
--- a/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
+++ b/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import "package:photos/core/error-reporting/super_logging.dart";
import "package:photos/core/event_bus.dart";
-import "package:photos/events/easter_animation_event.dart";
+import "package:photos/events/christmas_banner_event.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/service_locator.dart";
import 'package:photos/theme/ente_theme.dart';
@@ -162,18 +162,18 @@ class AdvancedSettingsScreen extends StatelessWidget {
const SizedBox(height: 24),
MenuItemWidget(
captionedTextWidget: const CaptionedTextWidget(
- title: "Easter animation",
+ title: "Christmas banner",
),
menuItemColor: colorScheme.fillFaint,
singleBorderRadius: 8,
alignCaptionedTextToLeft: true,
trailingWidget: ToggleSwitchWidget(
- value: () => localSettings.isEasterAnimationEnabled,
+ value: () => localSettings.isChristmasBannerEnabled,
onChanged: () async {
- await localSettings.setEasterAnimationEnabled(
- !localSettings.isEasterAnimationEnabled,
+ await localSettings.setChristmasBannerEnabled(
+ !localSettings.isChristmasBannerEnabled,
);
- Bus.instance.fire(EasterAnimationEvent());
+ Bus.instance.fire(ChristmasBannerEvent());
},
),
),
diff --git a/mobile/apps/photos/lib/ui/tabs/home_widget.dart b/mobile/apps/photos/lib/ui/tabs/home_widget.dart
index 28994c0250..e0dacad18f 100644
--- a/mobile/apps/photos/lib/ui/tabs/home_widget.dart
+++ b/mobile/apps/photos/lib/ui/tabs/home_widget.dart
@@ -19,8 +19,8 @@ import "package:photos/core/event_bus.dart";
import "package:photos/ente_theme_data.dart";
import "package:photos/events/account_configured_event.dart";
import "package:photos/events/backup_folders_updated_event.dart";
+import "package:photos/events/christmas_banner_event.dart";
import "package:photos/events/collection_updated_event.dart";
-import "package:photos/events/easter_animation_event.dart";
import "package:photos/events/files_updated_event.dart";
import "package:photos/events/homepage_swipe_to_select_in_progress_event.dart";
import "package:photos/events/permission_granted_event.dart";
@@ -136,8 +136,8 @@ class _HomeWidgetState extends State<HomeWidget> {
late StreamSubscription _publicAlbumLinkSubscription;
late StreamSubscription<HomepageSwipeToSelectInProgressEvent>
_homepageSwipeToSelectInProgressEventSubscription;
- late StreamSubscription<EasterAnimationEvent>
- _easterAnimationEventSubscription;
+ late StreamSubscription<ChristmasBannerEvent>
+ _christmasBannerEventSubscription;
final DiffFetcher _diffFetcher = DiffFetcher();
@@ -297,8 +297,8 @@ class _HomeWidgetState extends State<HomeWidget> {
_swipeToSelectInProgressNotifier.value = inProgress.isInProgress;
});
- _easterAnimationEventSubscription =
- Bus.instance.on<EasterAnimationEvent>().listen((_) {
+ _christmasBannerEventSubscription =
+ Bus.instance.on<ChristmasBannerEvent>().listen((_) {
if (mounted) {
setState(() {});
}
@@ -532,7 +532,7 @@ class _HomeWidgetState extends State<HomeWidget> {
_pageController.dispose();
_publicAlbumLinkSubscription.cancel();
_homepageSwipeToSelectInProgressEventSubscription.cancel();
- _easterAnimationEventSubscription.cancel();
+ _christmasBannerEventSubscription.cancel();
_swipeToSelectInProgressNotifier.dispose();
_christmasPullOffsetNotifier.dispose();
_christmasPullReleasedNotifier.dispose();
diff --git a/mobile/apps/photos/lib/utils/local_settings.dart b/mobile/apps/photos/lib/utils/local_settings.dart
index 8e11d83c27..1114d5de76 100644
--- a/mobile/apps/photos/lib/utils/local_settings.dart
+++ b/mobile/apps/photos/lib/utils/local_settings.dart
@@ -51,7 +51,7 @@ class LocalSettings {
static const _kWrapped2025ResumeIndex = "ls.wrapped_2025_resume_index";
static const _kWrapped2025Complete = "ls.wrapped_2025_complete";
static const _memoryLaneSeenKey = "faces_timeline_seen_person_ids";
- static const _kEasterAnimationEnabled = "ls.easter_animation_enabled";
+ static const _kChristmasBannerEnabled = "ls.christmas_banner_enabled";
final SharedPreferences _prefs;
@@ -313,10 +313,10 @@ class LocalSettings {
await _prefs.setBool(_kWrapped2025Complete, false);
}
- bool get isEasterAnimationEnabled =>
- _prefs.getBool(_kEasterAnimationEnabled) ?? true;
+ bool get isChristmasBannerEnabled =>
+ _prefs.getBool(_kChristmasBannerEnabled) ?? true;
- Future<void> setEasterAnimationEnabled(bool value) async {
- await _prefs.setBool(_kEasterAnimationEnabled, value);
+ Future<void> setChristmasBannerEnabled(bool value) async {
+ await _prefs.setBool(_kChristmasBannerEnabled, value);
}
}