fix(chat): remove remaining router Back interception
This commit is contained in:
@@ -78,7 +78,8 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
/// Called when a system Back belongs to the Runs detail, not the app stack.
|
||||
final VoidCallback onPopToRuns;
|
||||
|
||||
/// Called when a system Back belongs to one chat session.
|
||||
/// Legacy callback retained for callers; chat Back is owned by its Navigator
|
||||
/// route and never invokes this override.
|
||||
final VoidCallback onPopToChat;
|
||||
|
||||
final bool cupertino;
|
||||
@@ -262,6 +263,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
|
||||
bool get _isExitRoot =>
|
||||
_rootExit.enabled &&
|
||||
_route.chatSessionId == null &&
|
||||
!_canStepUp &&
|
||||
switch (_route.kind) {
|
||||
AppRouteKind.pipelines ||
|
||||
@@ -272,11 +274,10 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// Whether the open route has a level above it in its own tab (a stage,
|
||||
/// a run, a pipeline, a chat).
|
||||
/// Whether an inline run/pipeline detail needs the shell to step up. Chats
|
||||
/// always own a pushed route and use normal Navigator Back instead.
|
||||
bool get _canStepUp =>
|
||||
_route.runId != null ||
|
||||
_route.chatSessionId != null ||
|
||||
(_route.kind == AppRouteKind.pipelines && _route.pipelineId != null);
|
||||
|
||||
/// Goes up one level: a stage to its run or pipeline, an item to its list.
|
||||
@@ -299,10 +300,6 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if (_route.chatSessionId != null) {
|
||||
onPopToChat();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user