return of debug token for auth; ability to disable haptic and set logging level; etc

This commit is contained in:
2024-10-26 02:40:31 +03:00
parent ba43b6a940
commit babf20f62e
18 changed files with 204 additions and 59 deletions
+1
View File
@@ -14,6 +14,7 @@ android {
dependencies {
api(projects.core.common)
api(projects.core.model)
api(projects.core.datastore)
implementation(libs.moshi.kotlin)
implementation(libs.koin.android)
@@ -6,6 +6,8 @@ import com.slack.eithernet.ApiResultCallAdapterFactory
import com.slack.eithernet.ApiResultConverterFactory
import com.squareup.moshi.Moshi
import dev.meloda.fast.common.AppConstants
import dev.meloda.fast.common.model.LogLevel
import dev.meloda.fast.datastore.AppSettings
import dev.meloda.fast.network.JsonConverter
import dev.meloda.fast.network.MoshiConverter
import dev.meloda.fast.network.OAuthResultCallFactory
@@ -55,7 +57,12 @@ val networkModule = module {
.followSslRedirects(true)
.addInterceptor(
HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
level = when (AppSettings.Debug.networkLogLevel) {
LogLevel.NONE -> HttpLoggingInterceptor.Level.NONE
LogLevel.BASIC -> HttpLoggingInterceptor.Level.BASIC
LogLevel.HEADERS -> HttpLoggingInterceptor.Level.HEADERS
LogLevel.BODY -> HttpLoggingInterceptor.Level.BODY
}
}
)
.build()