-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Add Synced/Unsynced Lyrics Toggle and Refactor Musixmatch API, closes #…
…91 (#95) * Replaced the search endpoint with the full lyrics endpoint. Updated the query to separate artist and song name into distinct URL parameters (`artist` and `track`) instead of combining them. * Refactor and split MusixmatchLyricsResponse into Synced and Unsynced lyrics data classes - Added new `SyncedLyricsResponse` and `UnsyncedLyricsResponse` data classes to handle synced and unsynced lyrics separately. - Updated `MusixmatchSearchResponse` to include nullable `syncedLyrics` and `unsyncedLyrics` fields for more precise handling of lyric types. * (api:update) Refactor SongInfo model to include Musixmatch synced and unsynced lyrics data * Save the SongInfo object and use it to retreive data * Add SyncedLyricsSwitch component #91 * Update string resources * Update UserSettingsController and AboutScreen - Add syncedMusixmatch property to UserSettingsController - Update AboutScreen to include SyncedLyricsSwitch component * Refactor MusixmatchAPI to separate synced and unsynced lyrics retrieval * Refactor LyricsProviderService to add support for synced Musixmatch lyrics retrieval * Refactor HomeViewModel and LyricsFetchViewModel to include support for synced and unsynced Musixmatch lyrics retrieval
- Loading branch information
Showing
10 changed files
with
90 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/src/main/java/pl/lambada/songsync/ui/screens/about/components/SyncedLyricsSwitch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package pl.lambada.songsync.ui.screens.about.components | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import pl.lambada.songsync.R | ||
import pl.lambada.songsync.ui.components.AboutItem | ||
import pl.lambada.songsync.ui.components.SwitchItem | ||
|
||
@Composable | ||
fun SyncedLyricsSwitch(selected: Boolean, onToggle: (Boolean) -> Unit) { | ||
AboutItem(label = stringResource(id = R.string.synced_lyrics)) { | ||
SwitchItem( | ||
label = stringResource(id = R.string.synced_lyrics_summary), | ||
selected = selected, | ||
onClick = { onToggle(!selected) } | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters