Skip to content

Commit

Permalink
Add locally parameter to pop (#1)
Browse files Browse the repository at this point in the history
* Add same parameter to pop then in push

* update minor version

* api dump
  • Loading branch information
nlangheit authored Mar 15, 2024
1 parent 711a722 commit e05b668
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ android.enableJetifier=true
android.useAndroidX=true
kotlin.native.cacheKind=none
kotlin.mpp.stability.nowarn=true
version=0.1.1-SNAPSHOT
version=0.2.0
5 changes: 3 additions & 2 deletions navigation/common/api/navigation.api
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class com/mirego/pilot/navigation/DefaultPilotNavigationManager : com/mir
public fun currentRoutes ()Ljava/util/List;
public fun findRoute (Ljava/lang/String;)Lcom/mirego/pilot/navigation/PilotNavigationRoute;
public fun handleAction (Ljava/lang/Object;)V
public fun pop ()V
public fun pop (Z)V
public fun popToId (Ljava/lang/String;Z)V
public fun popToName (Ljava/lang/String;Z)V
public fun popToRoot ()V
Expand Down Expand Up @@ -43,7 +43,8 @@ public abstract class com/mirego/pilot/navigation/PilotNavigationManager {
public final fun getActionListener ()Lcom/mirego/pilot/navigation/PilotActionNavigationListener;
public final fun getListener ()Lcom/mirego/pilot/navigation/PilotNavigationListener;
public abstract fun handleAction (Ljava/lang/Object;)V
public abstract fun pop ()V
public abstract fun pop (Z)V
public static synthetic fun pop$default (Lcom/mirego/pilot/navigation/PilotNavigationManager;ZILjava/lang/Object;)V
public abstract fun popToId (Ljava/lang/String;Z)V
public abstract fun popToName (Ljava/lang/String;Z)V
public abstract fun popToRoot ()V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public open class DefaultPilotNavigationManager<ROUTE : PilotNavigationRoute, AC
}
}

override fun pop() {
override fun pop(locally: Boolean) {
if (!locally && parentNavigationManager != null) {
parentNavigationManager.pop(locally = locally)
return
}
internalPop(callListener = true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public abstract class PilotNavigationManager<ROUTE : PilotNavigationRoute, ACTIO
public abstract fun <T : ROUTE> findRoute(uniqueId: String): T?

public abstract fun push(route: ROUTE, locally: Boolean = false)
public abstract fun pop()
public abstract fun pop(locally: Boolean = false)
public abstract fun popToId(uniqueId: String, inclusive: Boolean)
public abstract fun popToName(name: String, inclusive: Boolean)
public abstract fun popToRoot()
Expand Down

0 comments on commit e05b668

Please sign in to comment.