Show the phone terminal shortcut on the Chat tab only

This commit is contained in:
2026-11-10 02:20:54 +00:00
parent d55e1e7162
commit d52eb4ba82
4 changed files with 37 additions and 4 deletions
@@ -32,6 +32,7 @@ class TerminalSurface extends StatefulWidget {
required this.layout,
required this.cupertino,
required this.child,
this.shortcutHere = true,
});
final TerminalHub hub;
@@ -39,6 +40,10 @@ class TerminalSurface extends StatefulWidget {
final bool cupertino;
final Widget child;
/// Whether the current page offers the phone shortcut to reopen the
/// terminal (the app shows it on Chat only).
final bool shortcutHere;
@override
State<TerminalSurface> createState() => _TerminalSurfaceState();
}
@@ -187,7 +192,7 @@ class _TerminalSurfaceState extends State<TerminalSurface>
/// app below never remounts when the shortcut comes or goes.
Widget _withShortcut(Widget child) {
final running = widget.hub.tabs.where((tab) => tab.info.running).length;
final show = _narrow && running > 0 && !_page.open;
final show = widget.shortcutHere && _narrow && running > 0 && !_page.open;
return Stack(
fit: StackFit.passthrough,
children: [