Skip to content

Commit ef40700

Browse files
committed
🚨 Fix Detekt Warnings
1 parent d9a1348 commit ef40700

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

app/src/main/java/co/stonephone/stonecamera/StoneCameraViewModel.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class StoneCameraViewModel(
7171
var selectedMode by mutableStateOf("Photo")
7272
private set
7373

74-
// TODO: make it save between sessions
74+
// TODO make it save between sessions
7575
var showShutterFlash by mutableStateOf(false)
7676
private set
7777

@@ -336,8 +336,9 @@ class StoneCameraViewModel(
336336

337337

338338
private fun bindUseCases() {
339-
// TODO: consider a job that can be interrupted?
339+
// TODO consider a job that can be interrupted?
340340
if (previewView == null || _cameraProvider == null || lifecycleOwner == null) return;
341+
341342
try {
342343
preview.surfaceProvider = previewView!!.surfaceProvider
343344

@@ -371,7 +372,7 @@ class StoneCameraViewModel(
371372
preview = createPreview()
372373
imageCapture = createImageCapture()
373374
imageAnalysis = createImageAnalysis()
374-
// TODO: videoCapture
375+
// TODO videoCapture
375376

376377
this.bindUseCases()
377378
}

app/src/main/java/co/stonephone/stonecamera/plugins/AspectRatio.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AspectRatioPlugin : IPlugin {
4040
viewModel: StoneCameraViewModel,
4141
imageCapture: ImageCapture.Builder
4242
): ImageCapture.Builder {
43-
// TODO: "FULL" aspect ratio isn't cropping on image capture
43+
// TODO "FULL" aspect ratio isn't cropping on image capture
4444
val ratioStr = viewModel.getSetting<String>("aspectRatio") ?: "16:9"
4545
val context = MyApplication.getAppContext()
4646

app/src/main/java/co/stonephone/stonecamera/plugins/FocusBase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class FocusBasePlugin : IPlugin {
4646
val meteringPoint = factory.createPoint(_x, _y)
4747

4848
val focusAction = FocusMeteringAction.Builder(meteringPoint).build()
49-
// TODO: I think this should keep going every few seconds to keep re-focusing on the area
49+
// TODO I think this should keep going every few seconds to keep re-focusing on the area
5050
viewModel!!.camera?.cameraControl?.startFocusAndMetering(focusAction)
5151
}
5252

app/src/main/java/co/stonephone/stonecamera/plugins/QRScanner.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class QRScannerPlugin : IPlugin {
6565
var width = 0f
6666

6767

68-
// TODO: RenderViewfinder to show the box around the QR code - I spent 6hrs on it and couldn't get it to line up
68+
// TODO RenderViewfinder to show the box around the QR code - I spent 6hrs on it and couldn't get it to line up
6969

7070
@Composable
7171
override fun renderTray(viewModel: StoneCameraViewModel, pluginInstance: IPlugin) {
@@ -133,7 +133,7 @@ class QRScannerPlugin : IPlugin {
133133

134134
@SuppressLint("RestrictedApi")
135135
@OptIn(ExperimentalGetImage::class)
136-
override val onImageAnalysis = { viewModel: StoneCameraViewModel,
136+
override val onImageAnalysis = { viewModel: StoneCameraViewModel,
137137
imageProxy: ImageProxy,
138138
image: Image
139139
->

app/src/main/java/co/stonephone/stonecamera/ui/RenderPluginSetting.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fun RenderPluginSetting(
1313
setting: PluginSetting,
1414
viewModel: StoneCameraViewModel,
1515
modifier: Modifier = Modifier
16-
// TODO: modes (e.g. compact: toggle in place, row: inform parent to hide others when active, full-row: always open)
16+
// TODO modes (e.g. compact: toggle in place, row: inform parent to hide others when active, full-row: always open)
1717
) {
1818
val value = viewModel.getSetting(setting.key) ?: setting.defaultValue
1919
when (setting) {

0 commit comments

Comments
 (0)