Skip to content

Commit be6015e

Browse files
committed
Fix detekt
1 parent 285cd5b commit be6015e

46 files changed

Lines changed: 79 additions & 104 deletions

File tree

Some content is hidden

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

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/application/MVVMTemplateApplication.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ class MVVMTemplateApplication : Application() {
3030
super.onCreate()
3131
Timber.plant(Timber.DebugTree())
3232
}
33-
34-
}
33+
}

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/di/module/ApiModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ class ApiModule {
1616
@Singleton
1717
fun products(retrofit: Retrofit): ProductsApi =
1818
retrofit.create(ProductsApi::class.java)
19-
20-
}
19+
}

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/di/module/AppModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ class AppModule {
5151
retentionPeriod = RetentionManager.Period.ONE_HOUR
5252
)
5353
}
54-
55-
}
54+
}

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/di/module/RepositoryModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ class RepositoryModule {
2727
pagingSourceByCoroutine = pagingSourceByCoroutine,
2828
productsApi = productsApi
2929
)
30-
31-
}
30+
}

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/di/module/UseCaseModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ class UseCaseModule {
4242
productsListRepository: ProductsListRepository,
4343
): GetBeerUseCase =
4444
GetBeerUseCase(productsListRepository::getBeer)
45-
46-
}
45+
}

app/src/main/kotlin/app/web/drjackycv/mvvmtemplate/main/MainActivity.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class MainActivity : AppCompatActivity() {
3838
super.onCreate(savedInstanceState)
3939

4040
setContent {
41-
val darkMode by dataStoreManager.isDarkMode.collectAsStateWithLifecycle(initialValue = isSystemInDarkTheme())
41+
val darkMode by dataStoreManager.isDarkMode
42+
.collectAsStateWithLifecycle(initialValue = isSystemInDarkTheme())
4243

4344
MyApp(
4445
darkMode = darkMode,
@@ -50,7 +51,9 @@ class MainActivity : AppCompatActivity() {
5051
content = {
5152
Icon(
5253
painter = painterResource(id = whichThemeIcon(darkMode.not())),
53-
contentDescription = stringResource(app.web.drjackycv.core.ui.R.string.content_description_theme),
54+
contentDescription = stringResource(
55+
R.string.content_description_theme,
56+
),
5457
)
5558
},
5659
)
@@ -80,8 +83,9 @@ class MainActivity : AppCompatActivity() {
8083
true -> AppCompatDelegate.MODE_NIGHT_YES
8184
false -> AppCompatDelegate.MODE_NIGHT_NO
8285
}
83-
if (AppCompatDelegate.getDefaultNightMode() != mode)
86+
if (AppCompatDelegate.getDefaultNightMode() != mode) {
8487
AppCompatDelegate.setDefaultNightMode(mode)
88+
}
8589
}
8690
}
8791
}

build-logic/convention/src/main/kotlin/config/AndroidInstrumentationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import org.gradle.api.Project
44
internal fun LibraryAndroidComponentsExtension.disableUnnecessaryAndroidTests(
55
project: Project,
66
) = beforeVariants {
7-
it.enableAndroidTest = it.enableAndroidTest
8-
&& project.projectDir.resolve("src/androidTest").exists()
7+
it.enableAndroidTest = it.enableAndroidTest &&
8+
project.projectDir.resolve("src/androidTest").exists()
99
}

core/common/src/main/kotlin/app/web/drjackycv/core/common/base/BaseViewModel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import javax.inject.Inject
1414
* for automatic RxJava subscription disposal tied to the ViewModel lifecycle.
1515
*/
1616
@HiltViewModel
17-
open class BaseViewModel @Inject constructor() : ViewModel(),
17+
open class BaseViewModel @Inject constructor() :
18+
ViewModel(),
1819
LifecycleScopeProvider<BaseViewModel.ViewModelEvent> {
1920

2021
private val lifecycleEventsDelegate =
@@ -55,4 +56,4 @@ open class BaseViewModel @Inject constructor() : ViewModel(),
5556
}
5657
}
5758
}
58-
}
59+
}

core/common/src/main/kotlin/app/web/drjackycv/core/common/base/Result.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ fun <T : Any> Flowable<T>.asResult(): Flowable<Result<T>> =
5959
Result.Error(Failure.Unknown(e.message))
6060
}
6161
}
62-
}
62+
}

core/common/src/main/kotlin/app/web/drjackycv/core/common/datastore/DataStoreManager.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,4 @@ class DataStoreManager @Inject constructor(@ApplicationContext appContext: Conte
3838
.map { preferences ->
3939
preferences[Settings.NIGHT_MODE] ?: false
4040
}
41-
42-
}
41+
}

0 commit comments

Comments
 (0)