Added lyrics shadow for better visibility of text
This commit is contained in:
parent
80f3926210
commit
5772fcd812
11 changed files with 34 additions and 22 deletions
|
@ -21,7 +21,7 @@ class BackupViewModel : ViewModel() {
|
|||
val backupsLiveData: LiveData<List<File>> = backupsMutableLiveData
|
||||
|
||||
fun loadBackups(context: Context) {
|
||||
BackupHelper.getBackupRoot(context).listFiles { _, name ->
|
||||
BackupHelper.getBackupRoot().listFiles { _, name ->
|
||||
return@listFiles name.endsWith(BackupHelper.BACKUP_EXTENSION)
|
||||
}?.toList()?.let {
|
||||
backupsMutableLiveData.value = it
|
||||
|
|
|
@ -12,8 +12,10 @@ import androidx.preference.PreferenceManager
|
|||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.SHOW_LYRICS
|
||||
import code.name.monkey.retromusic.databinding.FragmentCoverLyricsBinding
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
||||
import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment
|
||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
|
||||
import code.name.monkey.retromusic.fragments.base.goToLyrics
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||
import code.name.monkey.retromusic.model.lyrics.AbsSynchronizedLyrics
|
||||
|
@ -45,6 +47,14 @@ class CoverLyricsFragment : AbsMusicServiceFragment(R.layout.fragment_cover_lyri
|
|||
if (PreferenceUtil.showLyrics) {
|
||||
progressViewUpdateHelper?.start()
|
||||
}
|
||||
// Remove background on Fit theme
|
||||
val nps = PreferenceUtil.nowPlayingScreen
|
||||
if (nps == NowPlayingScreen.Fit || nps == NowPlayingScreen.Full) {
|
||||
binding.root.background = null
|
||||
}
|
||||
binding.playerLyricsLine2.setOnClickListener {
|
||||
goToLyrics(requireActivity())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
||||
|
|
|
@ -28,7 +28,7 @@ object BackupHelper : KoinComponent {
|
|||
|
||||
suspend fun createBackup(context: Context, name: String) {
|
||||
val backupFile =
|
||||
File(getBackupRoot(context), name + APPEND_EXTENSION)
|
||||
File(getBackupRoot(), name + APPEND_EXTENSION)
|
||||
if (backupFile.parentFile?.exists() != true) {
|
||||
backupFile.parentFile?.mkdirs()
|
||||
}
|
||||
|
@ -257,9 +257,9 @@ object BackupHelper : KoinComponent {
|
|||
}
|
||||
}
|
||||
|
||||
fun getBackupRoot(context: Context): File {
|
||||
fun getBackupRoot(): File {
|
||||
return File(
|
||||
context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS),
|
||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),
|
||||
"RetroMusic/Backups"
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue