Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ private fun QuickActionTilesSection(
quickActions.forEach { action ->
HomeActionTile(
icon = action.homeIcon(),
text = stringResource(action.titleRes),
text = stringResource(action.shortTitleRes),
onClick = {
when (action) {
is QuickAction.StandaloneQuickLink -> onQuickLink(action.quickLinkDestination)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private fun PreviewOnboardingContractCard() {
Surface(color = HedvigTheme.colorScheme.backgroundPrimary) {
OnboardingContractCard(
displayName = "displayName",
exposureName = "exposureName",
secondaryText = "secondaryText",
typeOfContract = "SE_HOUSE",
isComplete = false,
onAddClick = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.hedvig.android.apollo.safeExecute
import com.hedvig.android.core.common.ErrorMessage
import com.hedvig.android.core.common.di.AppScope
import com.hedvig.android.featureflags.FeatureManager
import com.hedvig.android.featureflags.flags.Feature
import com.hedvig.android.logger.LogPriority
import com.hedvig.android.logger.logcat
import com.hedvig.android.memberquickactions.QuickLinkDestination.OuterDestination.ChooseInsuranceForEditCoInsured
Expand Down Expand Up @@ -40,8 +39,9 @@ import hedvig.resources.HC_QUICK_ACTIONS_TRAVEL_CERTIFICATE
import hedvig.resources.HC_QUICK_ACTIONS_TRAVEL_CERTIFICATE_SUBTITLE
import hedvig.resources.HC_QUICK_ACTIONS_UPGRADE_COVERAGE_SUBTITLE
import hedvig.resources.HC_QUICK_ACTIONS_UPGRADE_COVERAGE_TITLE
import hedvig.resources.HOME_QUICK_ACTIONS_CHANGE_ADDRESS
import hedvig.resources.HOME_QUICK_ACTIONS_EDIT_INSURANCE
import hedvig.resources.Res
import kotlinx.coroutines.flow.first
import octopus.AvailableSelfServiceOnContractsQuery

interface GetMemberQuickActionsUseCase {
Expand Down Expand Up @@ -110,6 +110,7 @@ internal class GetMemberQuickActionsUseCaseImpl(
links = linksToExpand,
titleRes = Res.string.HC_QUICK_ACTIONS_EDIT_INSURANCE_TITLE,
hintTextRes = Res.string.HC_QUICK_ACTIONS_EDIT_INSURANCE_SUBTITLE,
shortTitleRes = Res.string.HOME_QUICK_ACTIONS_EDIT_INSURANCE,
),
)
}
Expand All @@ -119,6 +120,7 @@ internal class GetMemberQuickActionsUseCaseImpl(
quickLinkDestination = QuickLinkDestination.OuterDestination.QuickLinkChangeAddress,
titleRes = Res.string.HC_QUICK_ACTIONS_CHANGE_ADDRESS_TITLE,
hintTextRes = Res.string.HC_QUICK_ACTIONS_CHANGE_ADDRESS_SUBTITLE,
shortTitleRes = Res.string.HOME_QUICK_ACTIONS_CHANGE_ADDRESS,
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ sealed interface QuickAction {
val titleRes: StringResource
val hintTextRes: StringResource

/** Shorter title for the compact home tile; falls back to [titleRes] when no shorter copy exists. */
val shortTitleRes: StringResource

data class StandaloneQuickLink(
override val titleRes: StringResource,
override val hintTextRes: StringResource,
val quickLinkDestination: QuickLinkDestination,
override val shortTitleRes: StringResource = titleRes,
) : QuickAction

data class MultiSelectExpandedLink(
override val titleRes: StringResource,
override val hintTextRes: StringResource,
val links: List<StandaloneQuickLink>,
override val shortTitleRes: StringResource = titleRes,
) : QuickAction
}
Loading