App: chat colours, Ctrl+1-9 opens the Nth list item, starred chats alphabetical
A chat's colour is picked from its row menu (Colour...), a long-press or the chat information sheet. The list shows it as a leading bar, a faint row tint and a coloured avatar; the open chat shows a faint wash under its top bar. Shades are Cupertino's dynamic system colours and Material swatches tuned per brightness. Changes from other devices apply live. Ctrl+1...Ctrl+9 open the Nth item of the open tab's list (chats, runs, pipelines) in on-screen order, also while typing. Starred chats are sorted by name, case-insensitively, as one alphabetical group.
This commit is contained in:
@@ -10,6 +10,7 @@ import 'attention_badge.dart';
|
||||
import 'destination.dart';
|
||||
import 'list_detail.dart';
|
||||
import 'shell_bar.dart';
|
||||
import 'shell_list_shortcuts.dart';
|
||||
|
||||
class AdaptiveShell extends StatefulWidget {
|
||||
const AdaptiveShell({
|
||||
@@ -222,7 +223,15 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
|
||||
/// Handles this before focused text controls can insert or traverse on
|
||||
/// Ctrl+Tab. The handler is scoped to the shell's lifetime, not onboarding.
|
||||
///
|
||||
/// Ctrl+1…Ctrl+9 open the Nth item of the open tab's list the same way, in
|
||||
/// the list's on-screen order; a page (Settings) has no list.
|
||||
bool _handleDestinationKeyEvent(KeyEvent event) {
|
||||
final listIndex = shellListShortcutIndex(event, HardwareKeyboard.instance);
|
||||
if (listIndex != null) {
|
||||
if (!shellTabDestinations.contains(_selected)) return false;
|
||||
return _bar.lists.open(_selected, listIndex);
|
||||
}
|
||||
if (event is! KeyDownEvent ||
|
||||
event.logicalKey != LogicalKeyboardKey.tab ||
|
||||
!HardwareKeyboard.instance.isControlPressed) {
|
||||
|
||||
Reference in New Issue
Block a user