[PR #2] [MERGED] App codebase improvement #165

Closed
opened 2026-02-27 19:26:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Lambada10/SongSync/pull/2
Author: @BobbyESP
Created: 6/24/2023
Status: Merged
Merged: 6/25/2023
Merged by: @Lambada10

Base: masterHead: master


📝 Commits (10+)

  • aa45a8a - Moved almost every string to a string resource
  • 3a2e27d - Moved LyricsStatus to an enum class (would be better if they were sealed classes, but it's okay)
  • 574937d - Now the lyrics aren't searched every time you rotate the screen. (Note for the dev: using a LaunchedEffect you make sure that the rememberSaveable values are accessible)
  • 3caac09 - Merged the changes
  • f1bcbaf - Fixed app crashing at enter. (Same as before, use LaunchedEffect)
  • 6b8fc34 - Moved hardcoded strings to XML
  • 5e7d96e - Moved dependencies to versions catalog
  • 5c6efca - Made "Generated using SongSync" untranslatable
  • 786d9d2 - Started moving to coroutines
  • 9402aeb - Made the app name untranslatable

📊 Changes

18 files changed (+868 additions, -629 deletions)

View changed files

📝 app/build.gradle.kts (+14 -8)
📝 app/src/main/AndroidManifest.xml (+1 -0)
📝 app/src/main/java/pl/lambada/songsync/MainActivity.kt (+10 -7)
📝 app/src/main/java/pl/lambada/songsync/data/MainViewModel.kt (+12 -6)
📝 app/src/main/java/pl/lambada/songsync/data/Song.kt (+44 -4)
📝 app/src/main/java/pl/lambada/songsync/data/SongInfo.kt (+20 -0)
app/src/main/java/pl/lambada/songsync/data/ext/CoroutinesExt.kt (+6 -0)
app/src/main/java/pl/lambada/songsync/data/ext/StringExt.kt (+7 -0)
app/src/main/java/pl/lambada/songsync/ui/components/AboutCard.kt (+35 -0)
app/src/main/java/pl/lambada/songsync/ui/components/SongCard.kt (+55 -0)
📝 app/src/main/java/pl/lambada/songsync/ui/screens/AboutScreen.kt (+25 -53)
📝 app/src/main/java/pl/lambada/songsync/ui/screens/BrowseScreen.kt (+118 -125)
📝 app/src/main/java/pl/lambada/songsync/ui/screens/HomeScreen.kt (+428 -421)
📝 app/src/main/res/values/strings.xml (+66 -1)
📝 build.gradle.kts (+2 -0)
📝 gradle.properties (+4 -2)
📝 gradle/libs.versions.toml (+20 -1)
📝 gradle/wrapper/gradle-wrapper.properties (+1 -1)

📄 Description

  • Moved hard-coded strings to string resources
  • Moved UI states, Query states and LyricsStatus to enum classes
  • Added kotlinx.serialization
  • Added savers for serialization for both Song and SongInfo data classes
  • Added saver for Uri's
  • Fixed lyrics being cleared after rotating the screen (Note for the dev: using a LaunchedEffect you make sure that the rememberSaveable values are accessible)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Lambada10/SongSync/pull/2 **Author:** [@BobbyESP](https://github.com/BobbyESP) **Created:** 6/24/2023 **Status:** ✅ Merged **Merged:** 6/25/2023 **Merged by:** [@Lambada10](https://github.com/Lambada10) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`aa45a8a`](https://github.com/Lambada10/SongSync/commit/aa45a8aa999203afd8cfb087f0a3cec3ce54cb57) - Moved almost every string to a string resource - [`3a2e27d`](https://github.com/Lambada10/SongSync/commit/3a2e27d27f8792cafdcb12dbbebcf7da9a3f07a0) - Moved LyricsStatus to an enum class (would be better if they were sealed classes, but it's okay) - [`574937d`](https://github.com/Lambada10/SongSync/commit/574937d91dc325d034bd3ef271f30861ada3473e) - Now the lyrics aren't searched every time you rotate the screen. (Note for the dev: using a LaunchedEffect you make sure that the rememberSaveable values are accessible) - [`3caac09`](https://github.com/Lambada10/SongSync/commit/3caac099001c6f6805d5deea5e02dfdce4eebb02) - Merged the changes - [`f1bcbaf`](https://github.com/Lambada10/SongSync/commit/f1bcbaf0d16b85f13f32543cfc66a8a1705db091) - Fixed app crashing at enter. (Same as before, use LaunchedEffect) - [`6b8fc34`](https://github.com/Lambada10/SongSync/commit/6b8fc34a03bf36158fc06680a52a31683478e91b) - Moved hardcoded strings to XML - [`5e7d96e`](https://github.com/Lambada10/SongSync/commit/5e7d96e01a59bf45d280e81a0c587c4277987376) - Moved dependencies to versions catalog - [`5c6efca`](https://github.com/Lambada10/SongSync/commit/5c6efca157bb85b78788e4ca93e7e2fbd6bb1901) - Made "Generated using SongSync" untranslatable - [`786d9d2`](https://github.com/Lambada10/SongSync/commit/786d9d26df67da3f43051256275aaf2a2e4b41b2) - Started moving to coroutines - [`9402aeb`](https://github.com/Lambada10/SongSync/commit/9402aeb2b7a136ed83c9a3eec81798cfaeb57a96) - Made the app name untranslatable ### 📊 Changes **18 files changed** (+868 additions, -629 deletions) <details> <summary>View changed files</summary> 📝 `app/build.gradle.kts` (+14 -8) 📝 `app/src/main/AndroidManifest.xml` (+1 -0) 📝 `app/src/main/java/pl/lambada/songsync/MainActivity.kt` (+10 -7) 📝 `app/src/main/java/pl/lambada/songsync/data/MainViewModel.kt` (+12 -6) 📝 `app/src/main/java/pl/lambada/songsync/data/Song.kt` (+44 -4) 📝 `app/src/main/java/pl/lambada/songsync/data/SongInfo.kt` (+20 -0) ➕ `app/src/main/java/pl/lambada/songsync/data/ext/CoroutinesExt.kt` (+6 -0) ➕ `app/src/main/java/pl/lambada/songsync/data/ext/StringExt.kt` (+7 -0) ➕ `app/src/main/java/pl/lambada/songsync/ui/components/AboutCard.kt` (+35 -0) ➕ `app/src/main/java/pl/lambada/songsync/ui/components/SongCard.kt` (+55 -0) 📝 `app/src/main/java/pl/lambada/songsync/ui/screens/AboutScreen.kt` (+25 -53) 📝 `app/src/main/java/pl/lambada/songsync/ui/screens/BrowseScreen.kt` (+118 -125) 📝 `app/src/main/java/pl/lambada/songsync/ui/screens/HomeScreen.kt` (+428 -421) 📝 `app/src/main/res/values/strings.xml` (+66 -1) 📝 `build.gradle.kts` (+2 -0) 📝 `gradle.properties` (+4 -2) 📝 `gradle/libs.versions.toml` (+20 -1) 📝 `gradle/wrapper/gradle-wrapper.properties` (+1 -1) </details> ### 📄 Description - Moved hard-coded strings to string resources - Moved UI states, Query states and LyricsStatus to enum classes - Added kotlinx.serialization - Added savers for serialization for both Song and SongInfo data classes - Added saver for Uri's - Fixed lyrics being cleared after rotating the screen (Note for the dev: using a LaunchedEffect you make sure that the rememberSaveable values are accessible) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:26:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SongSync#165
No description provided.