From 3e3442fc89ebe4b2754c5a9b3b3cb618b2e508e3 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 31 Mar 2025 23:00:13 +0800 Subject: [PATCH] :lipstick: Enable new sfx on special days --- lib/main.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index f422262..ba55b0e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -405,9 +405,12 @@ class _AppSplashScreenState extends State<_AppSplashScreen> with TrayListener { final cfg = context.read(); if (!cfg.soundEffects) return; + final date = DateTime.now(); final player = AudioPlayer(playerId: 'launch-done-player'); await player.play( - AssetSource('audio/sfx/launch-done.mp3'), + (cfg.aprilFoolFeatures && date.month == 4 && date.day == 1) + ? AssetSource('audio/sfx/launch-intro.mp3') + : AssetSource('audio/sfx/launch-done.mp3'), volume: 0.8, ctx: AudioContext( android: AudioContextAndroid(