Skip to content

Commit

Permalink
Support backstack read operations from a background thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Kritarie committed Oct 31, 2023
1 parent b4b1e43 commit de65840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Versions {
const val compileSdkVersion = 30
const val minSdkVersion = 18
const val minSdkVersion = 21
const val targetSdkVersion = 30

const val kotlinVersion = "1.8.21"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.wealthfront.magellan.transitions.NoAnimationTransition
import com.wealthfront.magellan.view.whenMeasured
import java.util.ArrayDeque
import java.util.Deque
import java.util.concurrent.ConcurrentLinkedDeque

public open class NavigationDelegate(
protected val container: () -> ScreenContainer,
Expand All @@ -32,15 +33,11 @@ public open class NavigationDelegate(

protected var containerView: ScreenContainer? = null
protected val navigationPropagator: NavigationPropagator = NavigationPropagator
public val backStack: Deque<NavigationEvent> = ArrayDeque()
public val backStack: Deque<NavigationEvent> = ConcurrentLinkedDeque()

protected val Deque<NavigationEvent>.currentNavigable: NavigableCompat?
get() {
return if (isNotEmpty()) {
peek()?.navigable
} else {
null
}
return peek()?.navigable
}

protected val currentNavigable: NavigableCompat?
Expand Down

0 comments on commit de65840

Please sign in to comment.