-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#310] Ensure NavTarget and State are parcelable
- Loading branch information
1 parent
4f6678e
commit e2a15d0
Showing
126 changed files
with
418 additions
and
261 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
3 changes: 2 additions & 1 deletion
3
libraries/core/src/main/kotlin/com/bumble/appyx/core/children/ChildEntryExt.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
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
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
5 changes: 3 additions & 2 deletions
5
libraries/core/src/main/kotlin/com/bumble/appyx/core/navigation/EmptyNavModel.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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package com.bumble.appyx.core.navigation | ||
|
||
import android.os.Parcelable | ||
import com.bumble.appyx.core.navigation.onscreen.OnScreenStateResolver | ||
|
||
/** | ||
* An implementation of a NavModel that won't add any children. | ||
* This is potentially useful if your ParentNode only uses | ||
* [com.bumble.appyx.core.navigation.model.permanent.PermanentNavModel] | ||
*/ | ||
class EmptyNavModel<NavTarget, State> : BaseNavModel<NavTarget, State>( | ||
class EmptyNavModel<NavTarget : Parcelable> : BaseNavModel<NavTarget, EmptyState>( | ||
savedStateMap = null, | ||
finalState = null, | ||
screenResolver = OnScreenStateResolver { true } | ||
) { | ||
override val initialElements: NavElements<NavTarget, State> | ||
override val initialElements: NavElements<NavTarget, EmptyState> | ||
get() = emptyList() | ||
} |
12 changes: 12 additions & 0 deletions
12
libraries/core/src/main/kotlin/com/bumble/appyx/core/navigation/EmptyState.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,12 @@ | ||
package com.bumble.appyx.core.navigation | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Suppress("PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY") | ||
@Parcelize | ||
class EmptyState internal constructor() : Parcelable { | ||
companion object { | ||
val INSTANCE = EmptyState() | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
libraries/core/src/main/kotlin/com/bumble/appyx/core/navigation/NavModel.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
5 changes: 3 additions & 2 deletions
5
libraries/core/src/main/kotlin/com/bumble/appyx/core/navigation/NavModelAdapter.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
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
3 changes: 2 additions & 1 deletion
3
...n/com/bumble/appyx/core/navigation/backpresshandlerstrategies/BackPressHandlerStrategy.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
3 changes: 2 additions & 1 deletion
3
...m/bumble/appyx/core/navigation/backpresshandlerstrategies/BaseBackPressHandlerStrategy.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
3 changes: 2 additions & 1 deletion
3
...kotlin/com/bumble/appyx/core/navigation/backpresshandlerstrategies/DontHandleBackPress.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
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
3 changes: 2 additions & 1 deletion
3
...aries/core/src/main/kotlin/com/bumble/appyx/core/navigation/model/combined/NavModelExt.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
3 changes: 2 additions & 1 deletion
3
...core/src/main/kotlin/com/bumble/appyx/core/navigation/model/permanent/PermanentElement.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.bumble.appyx.core.navigation.model.permanent | ||
|
||
import com.bumble.appyx.core.navigation.EmptyState | ||
import com.bumble.appyx.core.navigation.NavElement | ||
|
||
typealias PermanentElement<T> = NavElement<T, Int> | ||
typealias PermanentElement<T> = NavElement<T, EmptyState> |
3 changes: 2 additions & 1 deletion
3
...ore/src/main/kotlin/com/bumble/appyx/core/navigation/model/permanent/PermanentElements.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.bumble.appyx.core.navigation.model.permanent | ||
|
||
import com.bumble.appyx.core.navigation.EmptyState | ||
import com.bumble.appyx.core.navigation.NavElements | ||
|
||
typealias PermanentElements<T> = NavElements<T, Int> | ||
typealias PermanentElements<T> = NavElements<T, EmptyState> |
Oops, something went wrong.