Skip to content

Commit

Permalink
Fix #363 - Add remember in AppState
Browse files Browse the repository at this point in the history
  • Loading branch information
skaengus2012 committed Dec 29, 2024
1 parent 3318913 commit 55baea4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/com/nlab/reminder/apps/ui/PlaneatAppState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.nlab.reminder.apps.ui

import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.remember
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import com.nlab.reminder.core.android.widget.Toast
Expand All @@ -39,7 +40,9 @@ class PlaneatAppState(
fun rememberPlaneatAppState(
navController: NavHostController = rememberNavController(),
appToast: Toast,
): PlaneatAppState = PlaneatAppState(
navController = navController,
appToast = appToast
)
): PlaneatAppState = remember(navController, appToast) {
PlaneatAppState(
navController = navController,
appToast = appToast
)
}

0 comments on commit 55baea4

Please sign in to comment.