Skip to content

Commit

Permalink
Merge pull request #97 from cyberagent-zemi/atsushi/add/annotations
Browse files Browse the repository at this point in the history
Improve performance
  • Loading branch information
mori-atsushi committed Jan 16, 2022
2 parents 3835a48 + acd44ca commit af0cc8b
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package jp.co.cyberagent.katalog.compose.navigation

import androidx.compose.runtime.Stable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf

@Stable
internal class NavController<T : NavDestination>(
startDestination: T
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package jp.co.cyberagent.katalog.compose.navigation

import androidx.compose.runtime.Stable

@Stable
internal interface NavDestination {
val childNavController: NavController<*>? get() = null
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package jp.co.cyberagent.katalog.compose.navigation

import androidx.compose.runtime.Immutable
import jp.co.cyberagent.katalog.util.UUIDWrapper

@Immutable
internal data class NavState<T>(
val destination: T,
val index: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package jp.co.cyberagent.katalog.domain

import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable

@Stable
internal sealed class CatalogItem {
abstract val identifier: CatalogItemIdentifier

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package jp.co.cyberagent.katalog.domain

import androidx.compose.runtime.Immutable

@Immutable
internal class CatalogItemIdentifier(
val parents: List<CatalogItemIdentifier>,
val name: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package jp.co.cyberagent.katalog.domain

import androidx.compose.runtime.Stable
import jp.co.cyberagent.katalog.ext.ExperimentalKatalogExtApi
import jp.co.cyberagent.katalog.ext.ExtComponentWrapper
import jp.co.cyberagent.katalog.ext.ExtRootWrapper
import jp.co.cyberagent.katalog.ext.KatalogExt

@OptIn(ExperimentalKatalogExtApi::class)
@Stable
internal data class Extensions(
val list: List<KatalogExt>
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package jp.co.cyberagent.katalog.domain

import androidx.compose.runtime.Stable

@Stable
internal data class Katalog(
val title: String,
val items: List<CatalogItem>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package jp.co.cyberagent.katalog.ext

import androidx.compose.runtime.Stable

@ExperimentalKatalogExtApi
@Stable
public interface ExtNavState {
public val current: String
public val backStack: List<String>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package jp.co.cyberagent.katalog.ext

import androidx.compose.runtime.Stable
import jp.co.cyberagent.katalog.domain.ExtensionBuilderImpl

@Stable
public interface KatalogExt {
public companion object {
@ExperimentalKatalogExtApi
Expand Down

0 comments on commit af0cc8b

Please sign in to comment.