diff --git a/android/app/src/main/kotlin/com/novasonic/app/ui/screen/HomeScreen.kt b/android/app/src/main/kotlin/com/novasonic/app/ui/screen/HomeScreen.kt index 267618c..ad5b1f5 100644 --- a/android/app/src/main/kotlin/com/novasonic/app/ui/screen/HomeScreen.kt +++ b/android/app/src/main/kotlin/com/novasonic/app/ui/screen/HomeScreen.kt @@ -30,7 +30,34 @@ import com.novasonic.app.api.model.Genre import com.novasonic.app.ui.component.AlbumCard import com.novasonic.app.ui.theme.* import com.novasonic.app.viewmodel.HomeViewModel -import java.util.Calendar + +private val greetingsWithName = listOf( + "Ready for some beats,", + "What's on the playlist,", + "Good vibes only,", + "Let the music play,", + "Your soundtrack awaits,", + "Turn it up,", + "Time to tune in,", + "Hit play and chill,", + "Music is the answer,", + "Welcome back,", +) + +private val greetingsNoName = listOf( + "Ready for some beats?", + "What's on the playlist today?", + "Good vibes only", + "Let the music play", + "Your soundtrack awaits", + "Turn it up", + "Time to tune in", + "Hit play and chill", + "Music is the answer", + "What are we listening to?", + "Time to escape into music", + "Pick something great", +) internal val genreColors = listOf( Color(0xFF1a1a3e), Color(0xFF1e2a1a), Color(0xFF2a1a1a), @@ -54,14 +81,8 @@ fun HomeScreen( LaunchedEffect(refreshKey) { if (refreshKey > 0) vm.load() } - val greeting = remember { - val hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) - when { - hour < 12 -> "Guten Morgen" - hour < 18 -> "Guten Tag" - else -> "Guten Abend" - } - } + val greeting = remember { greetingsNoName.random() } + val greetingWithName = remember { greetingsWithName.random() } LazyColumn( contentPadding = PaddingValues(bottom = 24.dp), @@ -70,7 +91,7 @@ fun HomeScreen( item { val name = state.username.replaceFirstChar { it.uppercaseChar() } Text( - text = if (name.isBlank()) greeting else "$greeting, $name 👋", + text = if (name.isBlank()) greeting else "$greetingWithName $name", fontFamily = Outfit, fontSize = 24.sp, fontWeight = FontWeight.Bold,