Fixed swipe anywhere not working immediately after changing in settings
This commit is contained in:
parent
0d9364e7c8
commit
860fa9d8b4
2 changed files with 16 additions and 18 deletions
|
@ -197,6 +197,9 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
|
||||||
chooseFragmentForTheme()
|
chooseFragmentForTheme()
|
||||||
onServiceConnected()
|
onServiceConnected()
|
||||||
}
|
}
|
||||||
|
SWIPE_ANYWHERE_NOW_PLAYING ->{
|
||||||
|
playerFragment?.onResume()
|
||||||
|
}
|
||||||
ADAPTIVE_COLOR_APP -> {
|
ADAPTIVE_COLOR_APP -> {
|
||||||
if (PreferenceUtil.nowPlayingScreen in listOf(Normal, Material, Flat)) {
|
if (PreferenceUtil.nowPlayingScreen in listOf(Normal, Material, Flat)) {
|
||||||
chooseFragmentForTheme()
|
chooseFragmentForTheme()
|
||||||
|
|
|
@ -55,17 +55,7 @@ class Factory(
|
||||||
val context: Context
|
val context: Context
|
||||||
) : ModelLoaderFactory<ArtistImage, InputStream> {
|
) : ModelLoaderFactory<ArtistImage, InputStream> {
|
||||||
|
|
||||||
private var deezerService: DeezerService
|
private var deezerService = DeezerService.invoke(
|
||||||
private var okHttp: OkHttpClient
|
|
||||||
|
|
||||||
init {
|
|
||||||
okHttp =
|
|
||||||
OkHttpClient.Builder()
|
|
||||||
.connectTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
|
||||||
.readTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
|
||||||
.writeTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
|
||||||
.build()
|
|
||||||
deezerService = DeezerService.invoke(
|
|
||||||
DeezerService.createDefaultOkHttpClient(context)
|
DeezerService.createDefaultOkHttpClient(context)
|
||||||
.connectTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
.connectTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
||||||
.readTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
.readTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
||||||
|
@ -73,7 +63,12 @@ class Factory(
|
||||||
.addInterceptor(createLogInterceptor())
|
.addInterceptor(createLogInterceptor())
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
private var okHttp = OkHttpClient.Builder()
|
||||||
|
.connectTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
||||||
|
.readTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
||||||
|
.writeTimeout(TIMEOUT, TimeUnit.MILLISECONDS)
|
||||||
|
.build()
|
||||||
|
|
||||||
private fun createLogInterceptor(): Interceptor {
|
private fun createLogInterceptor(): Interceptor {
|
||||||
val interceptor = HttpLoggingInterceptor()
|
val interceptor = HttpLoggingInterceptor()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue