code cleanup complete

This commit is contained in:
=logicgupta59 2022-03-09 22:51:47 +05:30
parent 16e765d150
commit 4aed5b81fe
2 changed files with 11 additions and 3 deletions

View file

@ -376,21 +376,26 @@ class LibraryViewModel(
playlists.isEmpty() -> {
Toast.makeText(
App.getContext(),
"$playlistName created successfully",
App.getContext()
.getString(R.string.playlist_created_sucessfully, playlistName),
Toast.LENGTH_SHORT
).show()
}
checkPlaylistExists(playlistName).isNotEmpty() -> {
Toast.makeText(
App.getContext(),
"Playlist already exists",
App.getContext().getString(R.string.playList_already_exits),
Toast.LENGTH_SHORT
).show()
}
playlists.isNotEmpty() -> {
Toast.makeText(
App.getContext(),
"Added ${songs.size} song(s) to $playlistName",
App.getContext().getString(
R.string.added_song_count_to_playlist,
songs.size,
playlistName
),
Toast.LENGTH_SHORT
).show()
}

View file

@ -544,4 +544,7 @@
<string name="you_will_be_forwarded_to_the_issue_tracker_website">You will be forwarded to the issue tracker website.</string>
<string name="your_account_data_is_only_used_for_authentication">Your account data is only used for authentication.</string>
<string name="customactivityoncrash_error_activity_error_details_share">Share Crash Report</string>
<string name="playlist_created_sucessfully">%s created successfully</string>
<string name="playList_already_exits">Playlist already exists</string>
<string name="added_song_count_to_playlist">Added %d song(s) to %s</string>
</resources>