Skip to content

Commit 2fa69d7

Browse files
committed
Minor syntax and kdoc updates
1 parent 7336fa0 commit 2fa69d7

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Shrine/app/src/main/java/com/authentication/shrine/ui/PasskeyManagementScreen.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,13 @@ fun PasskeyManagementScreen(
150150
modifier = Modifier.padding(dimensionResource(R.dimen.padding_small)),
151151
)
152152

153-
if (!passkeysList.isEmpty()) {
153+
if (passkeysList.isNotEmpty()) {
154154
PasskeysListColumn(
155155
onDeleteClicked = onDeleteClicked,
156156
passkeysList = passkeysList,
157157
aaguidData = aaguidData,
158158
)
159-
}
160-
161-
if (passkeysList.isEmpty()) {
159+
} else {
162160
ShrineButton(
163161
onClick = onCreatePasskeyClicked,
164162
buttonText = stringResource(R.string.create_passkey),

Shrine/app/src/main/java/com/authentication/shrine/ui/viewmodel/PasskeyManagementViewModel.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ import javax.inject.Inject
4040
* ViewModel for user passkey and password registration. Uses [AuthRepository] to interact with the
4141
* authentication backend
4242
*
43-
* @param repository The authentication repository.
43+
* @param authRepository The authentication repository.
44+
* @param application The application.
4445
*/
4546
@HiltViewModel
4647
class PasskeyManagementViewModel @Inject constructor(
@@ -122,9 +123,7 @@ class PasskeyManagementViewModel @Inject constructor(
122123
/**
123124
* Creates a passkey. This is similar to the function in [CreatePasskeyViewModel].
124125
*
125-
* @param onSuccess Callback to be invoked when the passkey creation is successful.
126126
* @param createPasskey Reference to [CredentialManagerUtils.createPasskey]
127-
* The boolean parameter indicates whether the user should be navigated to the home screen.
128127
*/
129128
fun createPasskey(
130129
createPasskey: suspend (JSONObject) -> GenericCredentialManagerResponse,
@@ -175,7 +174,7 @@ class PasskeyManagementViewModel @Inject constructor(
175174
)
176175
}
177176
}
178-
} catch(e: Exception) {
177+
} catch (e: Exception) {
179178
_uiState.update {
180179
it.copy(
181180
isLoading = false,
@@ -239,7 +238,6 @@ class PasskeyManagementViewModel @Inject constructor(
239238
* @param passkeysList A list of passkeys for the user returned from the server.
240239
* @param messageResourceId The resource ID of a message to display to the user.
241240
* @param errorMessage An error message returned from the server.
242-
* deletion.
243241
*/
244242
data class PasskeyManagementUiState(
245243
val aaguidData: Map<String, Map<String, String>> = emptyMap(),

0 commit comments

Comments
 (0)