diff --git a/app/src/main/java/com/muryno/muzic/App.kt b/app/src/main/java/com/muryno/muzic/App.kt index c7b51be..5145e2b 100644 --- a/app/src/main/java/com/muryno/muzic/App.kt +++ b/app/src/main/java/com/muryno/muzic/App.kt @@ -3,6 +3,5 @@ package com.muryno.muzic import android.app.Application import dagger.hilt.android.HiltAndroidApp - @HiltAndroidApp class App : Application() \ No newline at end of file diff --git a/app/src/main/java/com/muryno/muzic/di/ArtistDataSourceModule.kt b/app/src/main/java/com/muryno/muzic/di/ArtistDataSourceModule.kt index 62742b2..67b31f5 100644 --- a/app/src/main/java/com/muryno/muzic/di/ArtistDataSourceModule.kt +++ b/app/src/main/java/com/muryno/muzic/di/ArtistDataSourceModule.kt @@ -23,7 +23,6 @@ import javax.inject.Singleton @InstallIn(SingletonComponent::class) class ArtistDataSourceModule { - @Provides fun providerArtistAlbumApiToResponseDataMapper() = ArtistAlbumApiToResponseDataMapper() @@ -32,8 +31,6 @@ class ArtistDataSourceModule { fun providerArtistApiToResponseDataMapper() = ArtistApiToResponseDataMapper() - - @Provides fun providerArtistRemoteDataSource( musicApiService: MusicApiService, diff --git a/app/src/main/java/com/muryno/muzic/utils/NetworkConnectionInterceptor.kt b/app/src/main/java/com/muryno/muzic/utils/NetworkConnectionInterceptor.kt index 98df456..6d0a380 100644 --- a/app/src/main/java/com/muryno/muzic/utils/NetworkConnectionInterceptor.kt +++ b/app/src/main/java/com/muryno/muzic/utils/NetworkConnectionInterceptor.kt @@ -14,7 +14,7 @@ class NetworkConnectionInterceptor(context: Context) : Interceptor { @RequiresApi(Build.VERSION_CODES.M) override fun intercept(chain: Interceptor.Chain): Response { if (isNetworkAvailable() == 0) { - throw NoInternetException("Make sure you have an active data connection") + throw NoInternetException("Ensure you have an active internet connection") } else { return chain.proceed(chain.request()) } @@ -25,16 +25,16 @@ class NetworkConnectionInterceptor(context: Context) : Interceptor { var result = 0 // Returns connection type. 0: none; 1: mobile data; 2: wifi val cm = applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager - val capabilities = cm?.getNetworkCapabilities(cm.activeNetwork) - if (capabilities != null) { + val networkCapabilities = cm?.getNetworkCapabilities(cm.activeNetwork) + if (networkCapabilities != null) { when { - capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> { + networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> { result = 2 } - capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> { + networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> { result = 1 } - capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN) -> { + networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN) -> { result = 3 } } diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml index 07d5da9..b1aeb51 100644 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,100 +1,102 @@ + android:viewportHeight="107"> + + android:pathData="M0,0h108v108h-108" /> +