Ringtone permission dialog showing #937
Fix crashing on album edit or artist edit and
This commit is contained in:
parent
2f4632fd67
commit
f9206dcfdb
5 changed files with 9 additions and 13 deletions
|
@ -17,11 +17,7 @@ package code.name.monkey.retromusic.fragments.albums
|
|||
import android.app.ActivityOptions
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.SubMenu
|
||||
import android.view.View
|
||||
import android.view.*
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.text.HtmlCompat
|
||||
|
@ -287,8 +283,8 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
}
|
||||
|
||||
private fun setColors(color: Int) {
|
||||
shuffleAction.applyColor(color)
|
||||
playAction.applyOutlineColor(color)
|
||||
shuffleAction?.applyColor(color)
|
||||
playAction?.applyOutlineColor(color)
|
||||
}
|
||||
|
||||
override fun onAlbumClick(albumId: Long, view: View) {
|
||||
|
|
|
@ -223,8 +223,8 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
}
|
||||
|
||||
private fun setColors(color: Int) {
|
||||
shuffleAction.applyColor(color)
|
||||
playAction.applyOutlineColor(color)
|
||||
shuffleAction?.applyColor(color)
|
||||
playAction?.applyOutlineColor(color)
|
||||
}
|
||||
|
||||
override fun onAlbumClick(albumId: Long, view: View) {
|
||||
|
|
|
@ -50,13 +50,13 @@ import code.name.monkey.retromusic.model.lyrics.Lyrics
|
|||
import code.name.monkey.retromusic.repository.RealRepository
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.util.*
|
||||
import java.io.FileNotFoundException
|
||||
import kotlinx.android.synthetic.main.shadow_statusbar_toolbar.*
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.Dispatchers.Main
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.koin.android.ext.android.get
|
||||
import java.io.FileNotFoundException
|
||||
|
||||
abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragment(layout),
|
||||
Toolbar.OnMenuItemClickListener, IPaletteColorHolder, PlayerAlbumCoverFragment.Callbacks {
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.bumptech.glide.request.animation.GlideAnimation
|
|||
|
||||
abstract class SingleColorTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
||||
|
||||
protected val defaultFooterColor: Int
|
||||
private val defaultFooterColor: Int
|
||||
get() = ATHUtil.resolveColor(view.context, R.attr.colorControlNormal)
|
||||
|
||||
abstract fun onColorReady(color: Int)
|
||||
|
|
|
@ -73,7 +73,7 @@ class RingtoneManager(val context: Context) {
|
|||
return false
|
||||
}
|
||||
|
||||
fun getDialog(context: Context): AlertDialog {
|
||||
fun getDialog(context: Context) {
|
||||
return MaterialAlertDialogBuilder(context, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(R.string.dialog_title_set_ringtone)
|
||||
.setMessage(R.string.dialog_message_set_ringtone)
|
||||
|
@ -83,7 +83,7 @@ class RingtoneManager(val context: Context) {
|
|||
context.startActivity(intent)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.create()
|
||||
.create().show()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue