SecurityIcon

fun SecurityIcon(securityState: SecurityState, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Displays an icon representing the security status of a channel. Clicking the icon shows a detailed help dialog.

Parameters

securityState

The current SecurityState to display.

baseContentDescription

The base content description for the icon, to which the specific state description will be appended. Defaults to a generic security icon description.

externalOnClick

Optional lambda to be invoked when the icon is clicked, in addition to its primary action (showing a help dialog). This allows callers to inject custom side effects.


fun SecurityIcon(isLowEntropyKey: Boolean, isPreciseLocation: Boolean = false, isMqttEnabled: Boolean = false, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that derives the SecurityState from boolean flags.

Parameters

isLowEntropyKey

Whether the channel uses a low entropy key.

isPreciseLocation

Whether the channel has precise location enabled. Defaults to false.

isMqttEnabled

Whether MQTT is enabled for the channel. Defaults to false.

baseContentDescription

The base content description for the icon.

externalOnClick

Optional lambda to be invoked when the icon is clicked, in addition to its primary action (showing a help dialog). This allows callers to inject custom side effects.


fun SecurityIcon(channel: Channel, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes a Channel object to determine its security state.

Parameters

channel

The channel whose security status is to be displayed.

baseContentDescription

The base content description for the icon.

externalOnClick

Optional lambda for external actions, invoked when the icon is clicked.


fun SecurityIcon(channelSettings: <Error class: unknown class>, loraConfig: <Error class: unknown class>, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that enables recomposition when making changes to the ChannelSettings.

Parameters

baseContentDescription

The base content description for the icon.

externalOnClick

Optional lambda for external actions, invoked when the icon is clicked.


fun SecurityIcon(channelSet: <Error class: unknown class>, channelIndex: Int, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes an AppOnlyProtos.ChannelSet and a channel index. If the channel at the given index is not found, nothing is rendered.

Parameters

channelSet

The set of channels.

channelIndex

The index of the channel within the set.

baseContentDescription

The base content description for the icon.

externalOnClick

Optional lambda for external actions, invoked when the icon is clicked.


fun SecurityIcon(channelSet: <Error class: unknown class>, channelName: String, baseContentDescription: String = stringResource(id = R.string.security_icon_description), externalOnClick: () -> Unit? = null)

Overload for SecurityIcon that takes an AppOnlyProtos.ChannelSet and a channel name. If a channel with the given name is not found, nothing is rendered. This overload optimizes lookup by name by memoizing a map of channel names to settings.

Parameters

channelSet

The set of channels.

channelName

The name of the channel to find.

baseContentDescription

The base content description for the icon.

externalOnClick

Optional lambda for external actions, invoked when the icon is clicked.