Skip to content

Commit

Permalink
chore(DynamicDashboard): Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianDevel committed Feb 19, 2025
1 parent 5023452 commit cac048f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ data class MyKSuiteData(
get() = kSuitePack.type == KSuitePack.KSuitePackType.MY_KSUITE_PLUS ||
kSuitePack.type == KSuitePack.KSuitePackType.MY_KSUITE_PLUS_DRIVE_SOLO

inline val trialExpiryDate get() = trialExpiryAt?.let { Date(it * 1000) }
inline val trialExpiryDate get() = trialExpiryAt?.let { Date(it * 1_000) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ object ApiRoutes {

const val MANAGER_URL = "https://manager.infomaniak.com/v3/ng/home"

private const val PREPROD_BASE_URL = "https://api.staging-myksuite.dev.infomaniak.ch"
private const val BASE_URL = "https://api.infomaniak.com"

fun myKSuiteData() = "$BASE_URL/1/my_ksuite/current?with=drive,mail,pack,can_trial,has_auto_renew"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private fun SubscriptionInfoCard(
value = stringResource(R.string.myKSuiteDashboardUntil, expiryDate.format(FORMAT_DATE_SIMPLE)),
)
}
Spacer(Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Large))
InformationBlock(
modifier = paddedModifier,
text = stringResource(R.string.myKSuiteManageSubscriptionDescription),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import com.infomaniak.core.myksuite.ui.screens.MyKSuiteDashboardScreenData
open class MyKSuiteDashboardFragment : Fragment() {

private val navigationArgs: MyKSuiteDashboardFragmentArgs by navArgs()
private lateinit var composeView: ComposeView
private var composeView: ComposeView? = null

private val onClose: () -> Unit by lazy { { this@MyKSuiteDashboardFragment.findNavController().popBackStack() } }

Expand All @@ -47,6 +47,6 @@ open class MyKSuiteDashboardFragment : Fragment() {
}

protected fun resetContent(dashboardData: MyKSuiteDashboardScreenData) {
composeView.setContent { MyKSuiteDashboardScreen(dashboardScreenData = { dashboardData }, onClose = onClose) }
composeView?.setContent { MyKSuiteDashboardScreen(dashboardScreenData = { dashboardData }, onClose = onClose) }
}
}

0 comments on commit cac048f

Please sign in to comment.