Skip to content

Conversation

@ISNIT0
Copy link
Member

@ISNIT0 ISNIT0 commented Jan 11, 2025

  • Move photo and video mode logic and controls into plugins
  • Implement video pause & snapshot functionality
  • Improve dynamic use-case loading

Copy link
Collaborator

@julianharty julianharty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved subject to the comments for consideration.

CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY -> 1
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED -> 2
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL -> 3
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 -> 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is intended to be identical to the previous use-case (_FULL) how about adding a comment to say this rather than simply setting it to the same value?

val requiredUseCases: List<PluginUseCase> =
selectedModePlugin?.modeUseCases ?: emptyList()

// All use-cases (including not needed by selected plugin), but retaining the order from the selected plugin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v.minor suggested change to the comment to improve the grammar: "All use-cases (including those not needed by selected plugin), retaining the order of the selected plugin"

}

val modeLabel: String?
get() = null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to expand/extend this code later?

get() = null

val renderModeControl: @Composable() (() -> Unit)?
get() = null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto: are you planning to expand/extend this code later?

previousMode: String,
nextMode: String
): Unit {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this empty code for? Why is it needed?

// Settings for the plugin
val settings: List<PluginSetting>
val settings: (viewModel: StoneCameraViewModel) -> List<PluginSetting>
get() = { emptyList() }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a TODO here?

// Shutter button
Box(
modifier = Modifier
.size(60.dp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of hardcoded sizes... A trap for future maintenance.

horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.CenterVertically
) {
// Camera Switcher Button
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very glad these comments exist, otherwise it'd be vary difficult to guess what the code does.

if (isPaused) {
Icon(
imageVector = Icons.Filled.PlayArrow,
contentDescription = "Resume Recording",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Localisation to come, I hope.

@ISNIT0 ISNIT0 merged commit 0426939 into main Jan 13, 2025
2 checks passed
@ISNIT0 ISNIT0 deleted the ISNIT0/plugin-modes branch January 13, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants