Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Nov 26, 2024
1 parent eb48e8f commit 2752c7c
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import androidx.core.content.pm.ShortcutInfoCompat
import androidx.core.content.pm.ShortcutManagerCompat
import androidx.core.graphics.drawable.IconCompat
import androidx.core.net.toUri
import org.michaelbel.movies.ui.R
import org.michaelbel.movies.ui.appicon.shortcutSearchIconRes
import org.michaelbel.movies.ui.appicon.shortcutSettingsIconRes
import org.michaelbel.movies.ui.R

private const val SEARCH_SHORTCUT_ID = "searchShortcutId"
private const val SETTINGS_SHORTCUT_ID = "settingsShortcutId"

const val INTENT_ACTION_SEARCH = "movies_shortcut://search"
const val INTENT_ACTION_SETTINGS = "movies_shortcut://settings"

/**
* See [App Shortcuts Design Guidelines](https://commondatastorage.googleapis.com/androiddevelopers/shareables/design/app-shortcuts-design-guidelines.pdf)
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.michaelbel.movies.ui.shortcuts

const val INTENT_ACTION_SEARCH = "movies_shortcut://search"
const val INTENT_ACTION_SETTINGS = "movies_shortcut://settings"
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import org.koin.androidx.compose.koinViewModel
import org.michaelbel.movies.feed.FeedDestination
import org.michaelbel.movies.feed.feedGraph
import org.michaelbel.movies.settings.SettingsDestination
import org.michaelbel.movies.settings.settingsGraph
import org.michaelbel.movies.settings.settingsGraph2
import org.michaelbel.movies.ui.icons.MoviesIcons
import org.michaelbel.movies.ui.ktx.ObserveAsEvents

Expand Down Expand Up @@ -119,7 +119,7 @@ fun NavGraphBuilder.mainGraph(
navigateToSettings = navigateToSettings,
navigateToDetails = navigateToDetails
)
settingsGraph(
settingsGraph2(
navigateBack = {},
onRequestReview = onRequestReview,
onRequestUpdate = onRequestUpdate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.michaelbel.movies.gallery.navigateToGallery
import org.michaelbel.movies.search.navigateToSearch
import org.michaelbel.movies.search.searchGraph
import org.michaelbel.movies.settings.navigateToSettings
import org.michaelbel.movies.settings.settingsGraph
import org.michaelbel.movies.settings.settingsGraph2

@Composable
fun MainContent(
Expand Down Expand Up @@ -51,8 +51,10 @@ fun MainContent(
navigateBack = navHostController::popBackStack,
navigateToDetails = navHostController::navigateToDetails,
)
settingsGraph(
navigateBack = navHostController::popBackStack
settingsGraph2(
navigateBack = navHostController::popBackStack,
onRequestReview = {},
onRequestUpdate = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.michaelbel.movies.gallery.navigateToGallery
import org.michaelbel.movies.search.navigateToSearch
import org.michaelbel.movies.search.searchGraph
import org.michaelbel.movies.settings.navigateToSettings
import org.michaelbel.movies.settings.settingsGraph
import org.michaelbel.movies.settings.settingsGraph2

@Composable
fun MainContent(
Expand Down Expand Up @@ -51,8 +51,10 @@ fun MainContent(
navigateBack = navHostController::popBackStack,
navigateToDetails = navHostController::navigateToDetails,
)
settingsGraph(
navigateBack = navHostController::popBackStack
settingsGraph2(
navigateBack = navHostController::popBackStack,
onRequestReview = {},
onRequestUpdate = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ import androidx.navigation.navDeepLink
import org.michaelbel.movies.settings.ui.SettingsRoute
import org.michaelbel.movies.ui.shortcuts.INTENT_ACTION_SETTINGS

fun NavGraphBuilder.settingsGraph(
fun NavGraphBuilder.settingsGraph2(
navigateBack: () -> Unit,
onRequestReview: () -> Unit,
onRequestUpdate: () -> Unit
) {
composable<SettingsDestination>(
deepLinks = listOf(
navDeepLink { uriPattern = INTENT_ACTION_SETTINGS }
)
deepLinks = listOf(navDeepLink { uriPattern = INTENT_ACTION_SETTINGS })
) {
SettingsRoute(
onBackClick = navigateBack,
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 2752c7c

Please sign in to comment.