Skip to content

Commit

Permalink
Move routing extension functions to :core:compat:navigation (#456)
Browse files Browse the repository at this point in the history
For #369

* Update package
* Update imports
  • Loading branch information
EdricChan03 committed Jul 13, 2024
1 parent cdcd6ac commit df92c93
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ import com.edricchan.studybuddy.R
import com.edricchan.studybuddy.constants.Constants
import com.edricchan.studybuddy.constants.MimeTypeConstants
import com.edricchan.studybuddy.core.compat.navigation.CompatDestination
import com.edricchan.studybuddy.core.compat.navigation.auth.navigateToAccountInfo
import com.edricchan.studybuddy.core.compat.navigation.navigateToCalendar
import com.edricchan.studybuddy.core.compat.navigation.navigateToDebug
import com.edricchan.studybuddy.core.compat.navigation.navigateToHelp
import com.edricchan.studybuddy.core.compat.navigation.navigateToSettings
import com.edricchan.studybuddy.core.compat.navigation.navigateToTips
import com.edricchan.studybuddy.core.compat.navigation.task.navigateToTasksList
import com.edricchan.studybuddy.core.deeplink.AppDeepLink
import com.edricchan.studybuddy.core.deeplink.WebDeepLink
import com.edricchan.studybuddy.databinding.ActivityMainBinding
import com.edricchan.studybuddy.exts.android.startChooser
import com.edricchan.studybuddy.exts.androidx.preference.defaultSharedPreferences
import com.edricchan.studybuddy.exts.material.dialog.showMaterialAlertDialog
import com.edricchan.studybuddy.exts.material.snackbar.showSnackbar
import com.edricchan.studybuddy.navigation.compat.auth.navigateToAccountInfo
import com.edricchan.studybuddy.navigation.compat.compatGraphs
import com.edricchan.studybuddy.navigation.compat.navigateToCalendar
import com.edricchan.studybuddy.navigation.compat.navigateToDebug
import com.edricchan.studybuddy.navigation.compat.navigateToHelp
import com.edricchan.studybuddy.navigation.compat.navigateToSettings
import com.edricchan.studybuddy.navigation.compat.navigateToTips
import com.edricchan.studybuddy.navigation.compat.task.navigateToTasksList
import com.edricchan.studybuddy.ui.common.BaseActivity
import com.edricchan.studybuddy.ui.common.MainViewModel
import com.edricchan.studybuddy.ui.modules.main.fragment.showNavBottomSheet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import com.edricchan.studybuddy.BuildConfig
import com.edricchan.studybuddy.R
import com.edricchan.studybuddy.core.compat.navigation.navigateToDebug
import com.edricchan.studybuddy.core.compat.navigation.navigateToHelp
import com.edricchan.studybuddy.core.compat.navigation.navigateToSettings
import com.edricchan.studybuddy.core.compat.navigation.task.navigateToCreateTask
import com.edricchan.studybuddy.core.compat.navigation.task.navigateToTaskView
import com.edricchan.studybuddy.databinding.FragTodoBinding
import com.edricchan.studybuddy.exts.androidx.viewbinding.viewInflateBinding
import com.edricchan.studybuddy.exts.common.TAG
Expand All @@ -32,11 +37,6 @@ import com.edricchan.studybuddy.features.tasks.constants.sharedprefs.TodoOptions
import com.edricchan.studybuddy.features.tasks.data.model.TodoItem
import com.edricchan.studybuddy.features.tasks.migrations.TasksMigrator
import com.edricchan.studybuddy.features.tasks.vm.TasksListViewModel
import com.edricchan.studybuddy.navigation.compat.navigateToDebug
import com.edricchan.studybuddy.navigation.compat.navigateToHelp
import com.edricchan.studybuddy.navigation.compat.navigateToSettings
import com.edricchan.studybuddy.navigation.compat.task.navigateToCreateTask
import com.edricchan.studybuddy.navigation.compat.task.navigateToTaskView
import com.edricchan.studybuddy.ui.common.MainViewModel
import com.edricchan.studybuddy.ui.common.SnackBarData
import com.edricchan.studybuddy.ui.dialogs.showAuthRequiredDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import androidx.navigation.fragment.findNavController
import com.edricchan.studybuddy.BuildConfig
import com.edricchan.studybuddy.R
import com.edricchan.studybuddy.constants.Constants
import com.edricchan.studybuddy.core.compat.navigation.navigateToDebug
import com.edricchan.studybuddy.core.compat.navigation.navigateToSettings
import com.edricchan.studybuddy.databinding.FragTipsBinding
import com.edricchan.studybuddy.exts.androidx.preference.defaultSharedPreferences
import com.edricchan.studybuddy.exts.androidx.viewbinding.viewInflateBinding
import com.edricchan.studybuddy.navigation.compat.navigateToDebug
import com.edricchan.studybuddy.navigation.compat.navigateToSettings
import com.edricchan.studybuddy.utils.web.launchUri

class TipsFragment : Fragment() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.edricchan.studybuddy.navigation.compat
package com.edricchan.studybuddy.core.compat.navigation

import androidx.navigation.NavController
import androidx.navigation.NavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.CompatDestination

val DefaultNavOptionsBuilder: NavOptionsBuilder.() -> Unit = {
launchSingleTop = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.edricchan.studybuddy.navigation.compat.about
package com.edricchan.studybuddy.core.compat.navigation.about

import androidx.navigation.NavController
import androidx.navigation.NavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.CompatDestination
import com.edricchan.studybuddy.navigation.compat.DefaultNavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.DefaultNavOptionsBuilder

/**
* Navigates to the [CompatDestination.About.ViewLicenses] route.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.edricchan.studybuddy.navigation.compat.auth
package com.edricchan.studybuddy.core.compat.navigation.auth

import androidx.navigation.NavController
import androidx.navigation.NavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.CompatDestination
import com.edricchan.studybuddy.navigation.compat.DefaultNavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.DefaultNavOptionsBuilder

/**
* Navigates to the [CompatDestination.Auth.Account] route.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.edricchan.studybuddy.navigation.compat.task
package com.edricchan.studybuddy.core.compat.navigation.task

import androidx.navigation.NavController
import androidx.navigation.NavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.CompatDestination
import com.edricchan.studybuddy.navigation.compat.DefaultNavOptionsBuilder
import com.edricchan.studybuddy.core.compat.navigation.DefaultNavOptionsBuilder

/**
* Navigates to the [CompatDestination.Task.Root] route.
Expand Down

0 comments on commit df92c93

Please sign in to comment.