-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
486 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...commonMain/kotlin/dev/datlag/aniflow/ui/navigation/screen/favorites/FavoritesComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dev.datlag.aniflow.ui.navigation.screen.favorites | ||
|
||
import dev.datlag.aniflow.ui.navigation.Component | ||
|
||
interface FavoritesComponent : Component { | ||
|
||
fun viewWallpaper() | ||
fun viewHome() | ||
} |
23 changes: 23 additions & 0 deletions
23
...rc/commonMain/kotlin/dev/datlag/aniflow/ui/navigation/screen/favorites/FavoritesScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package dev.datlag.aniflow.ui.navigation.screen.favorites | ||
|
||
import androidx.compose.material3.Scaffold | ||
import androidx.compose.runtime.Composable | ||
import dev.datlag.aniflow.ui.navigation.screen.component.HidingNavigationBar | ||
import dev.datlag.aniflow.ui.navigation.screen.component.NavigationBarState | ||
|
||
@Composable | ||
fun FavoritesScreen(component: FavoritesComponent) { | ||
Scaffold( | ||
bottomBar = { | ||
HidingNavigationBar( | ||
visible = true, | ||
selected = NavigationBarState.Favorite, | ||
onWallpaper = component::viewWallpaper, | ||
onHome = component::viewHome, | ||
onFavorites = { } | ||
) | ||
} | ||
) { | ||
|
||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...Main/kotlin/dev/datlag/aniflow/ui/navigation/screen/favorites/FavoritesScreenComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package dev.datlag.aniflow.ui.navigation.screen.favorites | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.CompositionLocalProvider | ||
import androidx.compose.runtime.remember | ||
import com.arkivanov.decompose.ComponentContext | ||
import dev.chrisbanes.haze.HazeState | ||
import dev.datlag.aniflow.LocalHaze | ||
import dev.datlag.aniflow.common.onRender | ||
import org.kodein.di.DI | ||
|
||
class FavoritesScreenComponent( | ||
componentContext: ComponentContext, | ||
override val di: DI, | ||
private val onWallpaper: () -> Unit, | ||
private val onHome: () -> Unit, | ||
) : FavoritesComponent, ComponentContext by componentContext { | ||
|
||
@Composable | ||
override fun render() { | ||
val haze = remember { HazeState() } | ||
|
||
CompositionLocalProvider( | ||
LocalHaze provides haze | ||
) { | ||
onRender { | ||
FavoritesScreen(this) | ||
} | ||
} | ||
} | ||
|
||
override fun viewWallpaper() { | ||
onWallpaper() | ||
} | ||
|
||
override fun viewHome() { | ||
onHome() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.