image: simplify coverview internals
Remove the setting responsiveness from CoverView, given that it really doesn't need to that anymore.
This commit is contained in:
parent
a201cb15bc
commit
b2a3416289
1 changed files with 1 additions and 21 deletions
|
|
@ -76,7 +76,7 @@ import org.oxycblt.auxio.util.getInteger
|
|||
class CoverView
|
||||
@JvmOverloads
|
||||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
||||
FrameLayout(context, attrs, defStyleAttr), ImageSettings.Listener, UISettings.Listener {
|
||||
FrameLayout(context, attrs, defStyleAttr) {
|
||||
@Inject lateinit var imageLoader: ImageLoader
|
||||
@Inject lateinit var uiSettings: UISettings
|
||||
@Inject lateinit var imageSettings: ImageSettings
|
||||
|
|
@ -154,9 +154,6 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
imageSettings.registerListener(this)
|
||||
uiSettings.registerListener(this)
|
||||
}
|
||||
|
||||
override fun onFinishInflate() {
|
||||
|
|
@ -187,23 +184,6 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
imageSettings.unregisterListener(this)
|
||||
}
|
||||
|
||||
override fun onImageSettingsChanged() {
|
||||
val cover = currentCover ?: return
|
||||
bind(cover.songs, cover.desc, cover.errorRes)
|
||||
}
|
||||
|
||||
override fun onRoundModeChanged() {
|
||||
cornerRadiusRes = getCornerRadiusRes()
|
||||
applyBackgroundsToChildren()
|
||||
val cover = currentCover ?: return
|
||||
bind(cover.songs, cover.desc, cover.errorRes)
|
||||
}
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue