Skip to content

Commit 68eb9b0

Browse files
committed
documentation update for the feature/settings
1 parent 29818f2 commit 68eb9b0

File tree

9 files changed

+35
-15
lines changed

9 files changed

+35
-15
lines changed

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/about/AboutScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ internal fun AboutScreenContent(
114114
Image(
115115
painter = painterResource(Res.drawable.mifos_icon),
116116
contentDescription =
117-
stringResource(Res.string.feature_settings_about_logo_content_description),
117+
stringResource(Res.string.feature_settings_about_logo_content_description),
118118
modifier = Modifier
119119
.size(DesignToken.sizes.iconExtraLarge),
120120
)
@@ -160,7 +160,7 @@ internal fun AboutScreenContent(
160160
}
161161
Image(
162162
painter =
163-
painterResource(Res.drawable.ic_icon_money_transfer),
163+
painterResource(Res.drawable.ic_icon_money_transfer),
164164
contentDescription = null,
165165
modifier = Modifier.fillMaxWidth(),
166166
)

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/appInfo/AppInfoScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ internal fun AppInfoContent(
130130
Image(
131131
painter = painterResource(Res.drawable.mifos_icon),
132132
contentDescription =
133-
stringResource(Res.string.feature_settings_about_logo_content_description),
133+
stringResource(Res.string.feature_settings_about_logo_content_description),
134134
modifier = Modifier
135135
.size(DesignToken.sizes.iconExtraLarge),
136136
)
@@ -182,7 +182,7 @@ internal fun AppInfoContent(
182182
Image(
183183
painter = painterResource(Res.drawable.mifo_app_info_icon),
184184
contentDescription =
185-
stringResource(Res.string.feature_settings_appinfo_logo_content_description),
185+
stringResource(Res.string.feature_settings_appinfo_logo_content_description),
186186
modifier = Modifier
187187
.size(150.dp)
188188
.align(Alignment.BottomEnd).zIndex(0f),

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/faq/FaqViewmodel.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ internal data class FaqState(
9898
internal sealed interface FaqEvent {
9999
/** Signals that the UI should navigate back. */
100100
data object OnNavigateBack : FaqEvent
101+
101102
/** Signals that the UI should navigate to the help screen. */
102103
data object OnNavigateToHelp : FaqEvent
103104
}
@@ -108,6 +109,7 @@ internal sealed interface FaqEvent {
108109
internal sealed interface FaqAction {
109110
/** An action to navigate back. */
110111
data object NavigateBack : FaqAction
112+
111113
/** An action to navigate to the help screen. */
112114
data object NavigateToHelp : FaqAction
113115

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/help/HelpNavigation.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ internal fun NavGraphBuilder.helpDestination(
4242
)
4343
}
4444
}
45-

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/navigation/SettingsNavGraphRoute.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,3 @@ internal fun NavController.navigateToScreen(
100100
route: SettingsItems,
101101
navOptions: NavOptions? = null,
102102
) = navigate(route, navOptions)
103-

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/passcode/UpdatePasscodeViewModel.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright 2025 Mifos Initiative
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -344,6 +344,7 @@ internal data class PasscodeState(
344344
sealed interface DialogState {
345345
/** The dialog is showing a loading indicator. */
346346
data object Loading : DialogState
347+
347348
/** The dialog is showing a message.
348349
* @param message The string resource to display.
349350
*/
@@ -358,6 +359,7 @@ internal data class PasscodeState(
358359
internal sealed interface PasscodeEvent {
359360
/** Event to navigate back from the current screen. */
360361
data object OnNavigateBack : PasscodeEvent
362+
361363
/** Event to navigate to the main passcode screen after a successful update. */
362364
data object OnNavigateToPasscodeScreen : PasscodeEvent
363365
}
@@ -369,15 +371,19 @@ internal sealed interface PasscodeEvent {
369371
internal sealed interface PasscodeAction {
370372
/** Action triggered when the old passcode input changes. */
371373
data class OnOldPasscodeChange(val oldPasscode: String) : PasscodeAction
374+
372375
/** Action triggered when the new passcode input changes. */
373376
data class OnNewPasscodeChange(val newPasscode: String) : PasscodeAction
377+
374378
/** Action triggered when the confirm passcode input changes. */
375379
data class OnConfirmPasscodeChange(val confirmPasscode: String) : PasscodeAction
376380

377381
/** Action to toggle the visibility of the new passcode. */
378382
data object NewPasscodeVisibleClick : PasscodeAction
383+
379384
/** Action to toggle the visibility of the old passcode. */
380385
data object OldPasscodeVisibleClick : PasscodeAction
386+
381387
/** Action to toggle the visibility of the confirm passcode. */
382388
data object ConfirmPasscodeVisibleClick : PasscodeAction
383389

@@ -386,8 +392,10 @@ internal sealed interface PasscodeAction {
386392

387393
/** Action triggered when the user clicks the back navigation button. */
388394
data object NavigateBackClick : PasscodeAction
395+
389396
/** Action to dismiss the current dialog. */
390397
data object DismissDialog : PasscodeAction
398+
391399
/** Action to navigate to the passcode screen. */
392400
data object NavigateToPasscodeScreen : PasscodeAction
393401

@@ -397,6 +405,7 @@ internal sealed interface PasscodeAction {
397405
sealed interface Internal : PasscodeAction {
398406
/** Internal action representing the result of the update operation. */
399407
data class UpdatePasscodeResult(val result: StringResource) : Internal
408+
400409
/** Internal action triggered when the current passcode is fetched from the repository. */
401410
data class CurrentPasscodeReceived(val passcode: String) : Internal
402411
}

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/password/ChangePasswordViewModel.kt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,18 +550,21 @@ internal data class PasswordState(
550550
internal sealed interface DialogState {
551551
/** The dialog is showing a loading indicator. */
552552
data object Loading : DialogState
553+
553554
/** The dialog is showing a success message. */
554555
data class Success(val message: StringResource) : DialogState
556+
555557
/** The dialog is showing an error message. */
556558
data class Error(val message: StringResource) : DialogState
557559
}
560+
558561
/** Determines if the submit button should be enabled based on input validity and presence. */
559562
internal val isEnabled = oldPasswordError == null &&
560-
newPasswordError == null &&
561-
confirmPasswordError == null &&
562-
oldPassword.isNotEmpty() &&
563-
newPassword.isNotEmpty() &&
564-
confirmPassword.isNotEmpty()
563+
newPasswordError == null &&
564+
confirmPasswordError == null &&
565+
oldPassword.isNotEmpty() &&
566+
newPassword.isNotEmpty() &&
567+
confirmPassword.isNotEmpty()
565568
}
566569

567570
/**
@@ -578,33 +581,42 @@ internal sealed interface PasswordEvent {
578581
internal sealed interface PasswordAction {
579582
/** Action triggered when the old password input changes. */
580583
data class OnOldPasswordChange(val currentPassword: String) : PasswordAction
584+
581585
/** Action triggered when the new password input changes. */
582586
data class OnNewPasswordChange(val newPassword: String) : PasswordAction
587+
583588
/** Action triggered when the confirm password input changes. */
584589
data class OnConfirmPasswordChange(val confirmPassword: String) : PasswordAction
585590

586591
/** Action to toggle the visibility of the old password. */
587592
data object OldPasswordVisibleClick : PasswordAction
593+
588594
/** Action to toggle the visibility of the new password. */
589595
data object NewPasswordVisibleClick : PasswordAction
596+
590597
/** Action to toggle the visibility of the confirm password. */
591598
data object ConfirmPasswordVisibleClick : PasswordAction
592599

593600
/** Action triggered when the user clicks the submit button. */
594601
data object SubmitClick : PasswordAction
602+
595603
/** Action to retry submission after being blocked. */
596604
data object RetrySubmit : PasswordAction
605+
597606
/** Action to navigate back from the screen. */
598607
data object NavigateBack : PasswordAction
608+
599609
/** Action to dismiss the current dialog. */
600610
data object DismissDialog : PasswordAction
601611

602612
/** Defines internal actions that are not directly triggered by the user. */
603613
sealed interface Internal : PasswordAction {
604614
/** Internal action representing the result of the password update operation. */
605615
data class UpdatePasswordResult(val result: DataState<String>) : Internal
616+
606617
/** Internal action carrying the result of a password strength check. */
607618
data class ReceivePasswordStrengthResult(val result: PasswordStrengthResult) : Internal
619+
608620
/** Internal action for when the current password is fetched from the repository. */
609621
data class OldPasswordReceived(val password: String?) : Internal
610622
}
@@ -616,6 +628,7 @@ internal sealed interface PasswordAction {
616628
sealed class ValidationResult {
617629
/** Represents a successful validation. */
618630
data object Success : ValidationResult()
631+
619632
/** Represents a failed validation with an associated error message. */
620633
data class Error(val message: StringResource) : ValidationResult()
621634
}

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/settings/SettingsScreen.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ internal fun SettingsScreenContent(
159159
.padding(vertical = DesignToken.padding.large)
160160
.verticalScroll(rememberScrollState()),
161161

162-
) {
162+
) {
163163
when {
164164
state.isUserLoading -> {
165165
MifosProgressIndicator()
@@ -287,4 +287,3 @@ internal fun SettingsActions(
287287
}
288288
}
289289
}
290-

feature/settings/src/commonMain/kotlin/org/mifos/mobile/feature/settings/theme/ChangeThemeRoute.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ internal fun NavGraphBuilder.themeDestination(
4444
*/
4545
internal fun NavController.navigateToTheme(navOptions: NavOptions? = null) =
4646
navigate(SettingsItems.Theme, navOptions)
47-

0 commit comments

Comments
 (0)