diff --git a/app/build.gradle b/app/build.gradle index 0d1ba49f..d390587f 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,8 +35,8 @@ android { applicationId 'com.shabinder.spotiflyer' minSdkVersion 22 targetSdkVersion 29 - versionCode 6 - versionName "1.5" + versionCode 7 + versionName "1.5.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } packagingOptions { diff --git a/app/src/main/java/com/shabinder/spotiflyer/MainActivity.kt b/app/src/main/java/com/shabinder/spotiflyer/MainActivity.kt index c23208af..b4a1272e 100755 --- a/app/src/main/java/com/shabinder/spotiflyer/MainActivity.kt +++ b/app/src/main/java/com/shabinder/spotiflyer/MainActivity.kt @@ -45,12 +45,10 @@ import kotlinx.coroutines.launch import okhttp3.Interceptor import okhttp3.OkHttpClient import okhttp3.Request -import okhttp3.Response import retrofit2.Retrofit import retrofit2.converter.moshi.MoshiConverterFactory import javax.inject.Inject - @Suppress("DEPRECATION") @AndroidEntryPoint class MainActivity : AppCompatActivity(){ @@ -134,17 +132,13 @@ class MainActivity : AppCompatActivity(){ * */ private fun implementSpotifyService(token: String) { val httpClient: OkHttpClient.Builder = OkHttpClient.Builder() - httpClient.addInterceptor(object : Interceptor { - - override fun intercept(chain: Interceptor.Chain): Response { - val request: Request = - chain.request().newBuilder().addHeader( - "Authorization", - "Bearer $token" - ).build() - return chain.proceed(request) - - } + httpClient.addInterceptor(Interceptor { chain -> + val request: Request = + chain.request().newBuilder().addHeader( + "Authorization", + "Bearer $token" + ).build() + chain.proceed(request) }) val retrofit = Retrofit.Builder() diff --git a/app/src/main/java/com/shabinder/spotiflyer/downloadHelper/SpotifyDownloadHelper.kt b/app/src/main/java/com/shabinder/spotiflyer/downloadHelper/SpotifyDownloadHelper.kt index 5263d6a7..a68427d6 100755 --- a/app/src/main/java/com/shabinder/spotiflyer/downloadHelper/SpotifyDownloadHelper.kt +++ b/app/src/main/java/com/shabinder/spotiflyer/downloadHelper/SpotifyDownloadHelper.kt @@ -258,14 +258,13 @@ object SpotifyDownloadHelper { @SuppressLint("SetJavaScriptEnabled") fun applyWebViewSettings(webView: WebView) { val desktopUserAgent = - "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0" + "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0" val mobileUserAgent = "Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30" //Choose Mobile/Desktop client. webView.settings.userAgentString = desktopUserAgent webView.settings.loadWithOverviewMode = true - webView.settings.loadWithOverviewMode = true webView.settings.builtInZoomControls = true webView.settings.setSupportZoom(true) webView.isScrollbarFadingEnabled = false diff --git a/app/src/main/res/xml/app_update.xml b/app/src/main/res/xml/app_update.xml index 0be8c4d9..9be85832 100755 --- a/app/src/main/res/xml/app_update.xml +++ b/app/src/main/res/xml/app_update.xml @@ -18,8 +18,8 @@ - 1.5 - 6 + 1.5.1 + 7 https://github.com/Shabinder/SpotiFlyer/releases/download/1.5/SpotiFlyer-v1.5.apk \ No newline at end of file