diff --git a/app/src/main/java/com/lighthouse/ui/MainActivity.kt b/app/src/main/java/com/lighthouse/ui/MainActivity.kt
index dc384855a..ce27cb408 100644
--- a/app/src/main/java/com/lighthouse/ui/MainActivity.kt
+++ b/app/src/main/java/com/lighthouse/ui/MainActivity.kt
@@ -5,6 +5,7 @@ import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.databinding.DataBindingUtil
+import androidx.navigation.fragment.NavHostFragment
import com.lighthouse.beep.R
import com.lighthouse.beep.databinding.ActivityMainBinding
import com.lighthouse.features.common.ext.repeatOnStarted
@@ -25,13 +26,15 @@ class MainActivity : AppCompatActivity() {
}
private fun setUpIsLogin() {
-// val navController = findNavController(R.id.fcv)
+ val navHostFragment = supportFragmentManager.findFragmentById(R.id.fcv) as NavHostFragment
+ val navController = navHostFragment.navController
+ navController.popBackStack()
repeatOnStarted {
viewModel.isLogin().collect { isLogin ->
if (isLogin) {
-// navController.navigate()
+ navController.navigate(R.id.action_global_main_graph)
} else {
-// navController.navigate()
+ navController.navigate(R.id.action_global_intro_graph)
}
}
}
diff --git a/app/src/main/res/navigation/main_graph.xml b/app/src/main/res/navigation/main_graph.xml
index 75471329a..6c0f30cad 100644
--- a/app/src/main/res/navigation/main_graph.xml
+++ b/app/src/main/res/navigation/main_graph.xml
@@ -1,7 +1,26 @@
+ android:id="@+id/main_graph"
+ app:startDestination="@id/main_nav_graph">
+
+
+
+
+
+
\ No newline at end of file
diff --git a/features/ui-intro/src/main/res/values/navigation.xml b/features/ui-intro/src/main/res/values/navigation.xml
deleted file mode 100644
index a6b3daec9..000000000
--- a/features/ui-intro/src/main/res/values/navigation.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/features/ui-main/build.gradle.kts b/features/ui-main/build.gradle.kts
index 2a2b21c18..73e436107 100644
--- a/features/ui-main/build.gradle.kts
+++ b/features/ui-main/build.gradle.kts
@@ -16,6 +16,9 @@ dependencies {
implementation(projects.common)
implementation(projects.commonAndroid)
implementation(projects.uiCommon)
+ implementation(projects.uiGifticonlist)
+ implementation(projects.uiHome)
+ implementation(projects.uiSetting)
implementation(libs.androidX.core.ktx)
implementation(libs.androidX.appcompat)
diff --git a/features/ui-main/src/main/java/com/lighthouse/features/main/ui/MainContainerFragment.kt b/features/ui-main/src/main/java/com/lighthouse/features/main/ui/MainContainerFragment.kt
index b7f6d22ae..9cecb61c5 100644
--- a/features/ui-main/src/main/java/com/lighthouse/features/main/ui/MainContainerFragment.kt
+++ b/features/ui-main/src/main/java/com/lighthouse/features/main/ui/MainContainerFragment.kt
@@ -4,8 +4,6 @@ import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
-import androidx.navigation.fragment.NavHostFragment
-import androidx.navigation.ui.setupWithNavController
import com.lighthouse.core.android.utils.permission.StoragePermissionManager
import com.lighthouse.core.android.utils.permission.core.permissions
import com.lighthouse.features.common.binding.viewBindings
@@ -30,12 +28,12 @@ class MainContainerFragment : Fragment(R.layout.fragment_main_container) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- setUpBottomNavigation()
+// setUpBottomNavigation()
}
private fun setUpBottomNavigation() {
- val navHostFragment = childFragmentManager.findFragmentById(R.id.fcv) as NavHostFragment
- val navController = navHostFragment.navController
- binding.bnv.setupWithNavController(navController)
+// val navHostFragment = childFragmentManager.findFragmentById(R.id.fcv_main) as NavHostFragment
+// val navController = navHostFragment.navController
+// binding.bnv.setupWithNavController(navController)
}
}
diff --git a/features/ui-main/src/main/res/layout/fragment_main_container.xml b/features/ui-main/src/main/res/layout/fragment_main_container.xml
index e183d56fd..767c540c7 100644
--- a/features/ui-main/src/main/res/layout/fragment_main_container.xml
+++ b/features/ui-main/src/main/res/layout/fragment_main_container.xml
@@ -15,11 +15,12 @@
android:fitsSystemWindows="true">
\ No newline at end of file
diff --git a/features/ui-main/src/main/res/navigation/main_container_nav_graph.xml b/features/ui-main/src/main/res/navigation/main_container_nav_graph.xml
new file mode 100644
index 000000000..133efdab2
--- /dev/null
+++ b/features/ui-main/src/main/res/navigation/main_container_nav_graph.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/features/ui-main/src/main/res/navigation/main_nav_graph.xml b/features/ui-main/src/main/res/navigation/main_nav_graph.xml
index 3f5e85f5f..6de9d16d0 100644
--- a/features/ui-main/src/main/res/navigation/main_nav_graph.xml
+++ b/features/ui-main/src/main/res/navigation/main_nav_graph.xml
@@ -2,9 +2,9 @@
+ app:startDestination="@id/fragment_main_container">
+ android:id="@+id/fragment_main_container"
+ android:name="com.lighthouse.features.main.ui.MainContainerFragment"/>
\ No newline at end of file