Skip to content

Commit c89b9e8

Browse files
committed
Update libs & fix bottom inset padding, cleanup code
1 parent c9398c4 commit c89b9e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+98
-73
lines changed

app/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import Libs.retrofit
3939
import Libs.retrofit_moshi
4040
import Libs.timber
4141
import java.io.FileInputStream
42-
import java.util.Properties
42+
import java.util.*
4343

4444
plugins {
4545
id("com.android.application")
@@ -111,6 +111,9 @@ android {
111111

112112
compileOptions {
113113
isCoreLibraryDesugaringEnabled = true
114+
115+
sourceCompatibility = JavaVersion.VERSION_11
116+
targetCompatibility = JavaVersion.VERSION_11
114117
}
115118

116119
buildFeatures {
@@ -120,6 +123,10 @@ android {
120123
composeOptions {
121124
kotlinCompilerExtensionVersion = Versions.composeVersion
122125
}
126+
127+
kotlin {
128+
jvmToolchain(11)
129+
}
123130
}
124131

125132
dependencies {

app/src/main/java/com/zakrodionov/practicalapp/app/core/BaseError.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object NetworkConnectionError : BaseError() {
2020
@Parcelize
2121
data class HttpError(
2222
val code: Int = 0,
23-
val status: TextResource = TextResource.empty,
23+
val status: TextResource = TextResource.empty
2424
) : BaseError()
2525

2626
@Parcelize

app/src/main/java/com/zakrodionov/practicalapp/app/core/BaseShowEvent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ data class ShowDialog(
1919
val tag: String? = null,
2020
val cancelable: Boolean = false,
2121
@StyleRes val messageTextAppearance: Int? = null,
22-
@StyleRes val theme: Int? = null,
22+
@StyleRes val theme: Int? = null
2323
) : BaseShowEvent()

app/src/main/java/com/zakrodionov/practicalapp/app/core/BaseViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import kotlinx.coroutines.launch
2222
abstract class BaseViewModel<STATE : Parcelable, EVENT : Any>(
2323
initialState: STATE,
2424
protected open val savedStateHandle: SavedStateHandle? = null,
25-
protected open val dispatchersProvider: DispatchersProvider = DispatchersProviderImpl,
25+
protected open val dispatchersProvider: DispatchersProvider = DispatchersProviderImpl
2626
) : ViewModel() {
2727

2828
companion object {

app/src/main/java/com/zakrodionov/practicalapp/app/core/ErrorHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ErrorHandlerImpl(private val connectionService: ConnectionService) : Error
4141
is SocketException,
4242
is SocketTimeoutException,
4343
is UnknownHostException,
44-
is ProtocolException,
44+
is ProtocolException
4545
-> true
4646
else -> false
4747
}

app/src/main/java/com/zakrodionov/practicalapp/app/data/network/RequestHeaderInterceptor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.zakrodionov.practicalapp.app.data.preferences.AppPreferences
66
import okhttp3.Request
77

88
class RequestHeaderInterceptor(
9-
private val appPreferences: AppPreferences,
9+
private val appPreferences: AppPreferences
1010
) : RequestInterceptor() {
1111

1212
override fun interceptRequest(requestBuilder: Request.Builder) {

app/src/main/java/com/zakrodionov/practicalapp/app/data/network/RequestTokenAuthenticator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import retrofit2.http.POST
1515
// Used to get 401 errors and updates the token
1616
class RequestTokenAuthenticator(
1717
private val api: ApiAuthRefreshTokens,
18-
private val appPreferences: AppPreferences,
18+
private val appPreferences: AppPreferences
1919
) : TokenAuthenticator() {
2020

2121
override fun getAccessToken(): String = appPreferences.accessToken

app/src/main/java/com/zakrodionov/practicalapp/app/di/Modules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ val allModules = listOf(
1313
netModule,
1414
storagesModule,
1515
apiModule,
16-
repositoryModule,
16+
repositoryModule
1717
)

app/src/main/java/com/zakrodionov/practicalapp/app/di/modules/netModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fun basicOkHttpBuilder(): OkHttpClient.Builder {
5656

5757
private fun buildOkHttp(
5858
requestHeaderInterceptor: RequestHeaderInterceptor,
59-
requestTokenAuthenticator: RequestTokenAuthenticator,
59+
requestTokenAuthenticator: RequestTokenAuthenticator
6060
): OkHttpClient {
6161
val okHttpClientBuilder = basicOkHttpBuilder()
6262
okHttpClientBuilder.addInterceptor(requestHeaderInterceptor)

app/src/main/java/com/zakrodionov/practicalapp/app/domain/model/Posts.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ data class Posts(
2020
@Json(name = "page")
2121
val page: Int?,
2222
@Json(name = "total")
23-
val total: Int?,
23+
val total: Int?
2424
) {
2525
@JsonClass(generateAdapter = true)
2626
@Parcelize
@@ -40,7 +40,7 @@ data class Posts(
4040
@Json(name = "tags")
4141
val tags: List<String?>? = null,
4242
@Json(name = "text")
43-
val text: String? = null,
43+
val text: String? = null
4444
) : DiffItem, WaitFixForParcelable {
4545
@JsonClass(generateAdapter = true)
4646
@Parcelize
@@ -56,7 +56,7 @@ data class Posts(
5656
@Json(name = "picture")
5757
val picture: String?,
5858
@Json(name = "title")
59-
val title: String?,
59+
val title: String?
6060
) : Parcelable, WaitFixForParcelable
6161

6262
override val itemId: String

0 commit comments

Comments
 (0)