Skip to content

Commit 84206fc

Browse files
committed
new builds
1 parent adac1c1 commit 84206fc

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

.DS_Store

6 KB
Binary file not shown.

app/.DS_Store

6 KB
Binary file not shown.

app/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
minSdk 24
1414
targetSdk 31
1515
versionCode 7
16-
versionName "1.0.7"
16+
versionName "1.0.8"
1717

1818
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1919
vectorDrawables {
@@ -63,10 +63,10 @@ dependencies {
6363
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
6464

6565
// Compose dependencies
66-
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0"
67-
implementation "androidx.navigation:navigation-compose:2.4.0-SNAPSHOT"
66+
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0"
67+
implementation "androidx.navigation:navigation-compose:2.5.0"
6868
implementation "androidx.compose.material:material-icons-extended:$compose_version"
69-
implementation "androidx.hilt:hilt-navigation-compose:1.0.0-beta01"
69+
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
7070

7171
def accompanist_version = '0.20.2'
7272
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
@@ -77,8 +77,8 @@ dependencies {
7777
implementation "com.google.accompanist:accompanist-insets:$accompanist_version"
7878

7979
// Coroutines
80-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
81-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
80+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2'
81+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2'
8282

8383
//Dagger - Hilt
8484
implementation "com.google.dagger:hilt-android:2.38.1"
@@ -87,11 +87,11 @@ dependencies {
8787
kapt "androidx.hilt:hilt-compiler:1.0.0"
8888

8989
// Room
90-
implementation "androidx.room:room-runtime:2.3.0"
91-
kapt "androidx.room:room-compiler:2.3.0"
90+
implementation "androidx.room:room-runtime:2.4.2"
91+
kapt "androidx.room:room-compiler:2.4.2"
9292

9393
// Kotlin Extensions and Coroutines support for Room
94-
implementation "androidx.room:room-ktx:2.3.0"
94+
implementation "androidx.room:room-ktx:2.4.2"
9595

9696
// Coil
9797
implementation "io.coil-kt:coil-compose:1.4.0"

app/src/main/java/com/dxn/wallpaperx/common/helpers/ResourceProvider.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.dxn.wallpaperx.common.helpers
22

33
import android.content.Context
44
import androidx.annotation.StringRes
5+
import com.dxn.wallpaperx.R
56
import dagger.hilt.android.qualifiers.ApplicationContext
67
import javax.inject.Inject
78
import javax.inject.Singleton
@@ -13,4 +14,6 @@ class ResourcesProvider @Inject constructor(
1314
fun getString(@StringRes stringResId: Int): String {
1415
return context.getString(stringResId)
1516
}
17+
18+
val unsplashApiKey get() = context.getString(R.string.unsplash_api_key)
1619
}

app/src/main/java/com/dxn/wallpaperx/data/remote/unsplash/UnsplashRepository.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.dxn.wallpaperx.data.remote.unsplash
22

3-
import com.dxn.wallpaperx.R
43
import com.dxn.wallpaperx.common.helpers.ResourcesProvider
54
import com.dxn.wallpaperx.data.remote.RemoteRepository
65
import com.dxn.wallpaperx.data.remote.unsplash.models.collection.CollectionDto
@@ -13,14 +12,11 @@ class UnsplashRepository(
1312
private val resourcesProvider: ResourcesProvider
1413
) : RemoteRepository {
1514

16-
private val apikey = resourcesProvider.getString(R.string.unsplash_api_key)
17-
18-
1915
override suspend fun getWallpapers(page: Int, query: String): List<Wallpaper> {
2016
return unsplashApi.getImages(
2117
query = query,
2218
page = page,
23-
apikey = resourcesProvider.getString(R.string.unsplash_api_key)
19+
apikey = resourcesProvider.unsplashApiKey
2420
).results.map { imageDtoToWallpaper(it) }
2521
}
2622

@@ -29,13 +25,13 @@ class UnsplashRepository(
2925
}
3026

3127
override suspend fun getCollections(page: Int): List<Collection> =
32-
unsplashApi.getCollection(page, apikey = apikey).map { collectionDtoToCollection(it) }
28+
unsplashApi.getCollection(page, apikey = resourcesProvider.unsplashApiKey).map { collectionDtoToCollection(it) }
3329

3430
override suspend fun getWallpapersByCollection(
3531
collectionId: String,
3632
page: Int
3733
): List<Wallpaper> =
38-
unsplashApi.getPhotosByCollection(collectionId, page, apikey = apikey)
34+
unsplashApi.getPhotosByCollection(collectionId, page, apikey = resourcesProvider.unsplashApiKey)
3935
.map { imageDtoToWallpaper(it) }
4036
}
4137

assets/.DS_Store

6 KB
Binary file not shown.

local.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# Location of the SDK. This is only used by Gradle.
55
# For customization when using a Version Control System, please read the
66
# header note.
7-
#Sat Oct 23 22:59:00 IST 2021
8-
sdk.dir=/home/divyansh/Android/Sdk
7+
#Wed Jul 13 19:59:53 IST 2022
8+
sdk.dir=/Users/divyansh/Library/Android/sdk

0 commit comments

Comments
 (0)