chore(app): chat probes take platform/theme/tasks queries; note chat chrome fixes
This commit is contained in:
@@ -132,11 +132,22 @@ const _probeStyle = String.fromEnvironment(
|
||||
void main() {
|
||||
final dark = Uri.base.queryParameters['dark'] == '1';
|
||||
final unseen = Uri.base.queryParameters['unseen'] == '1';
|
||||
final home = ChatSessionsScreen(
|
||||
gateway: _FixtureGateway(bumpAfterFirstRead: unseen),
|
||||
onOpen: (_) {},
|
||||
);
|
||||
if (_probeStyle == 'cupertino') {
|
||||
final gateway = _FixtureGateway(bumpAfterFirstRead: unseen);
|
||||
// `?many=1` adds enough chats to scroll the list behind the bar.
|
||||
if (Uri.base.queryParameters['many'] == '1') {
|
||||
gateway._sessions.addAll([
|
||||
for (var i = 0; i < 24; i++)
|
||||
{
|
||||
'id': 'probe-many-$i',
|
||||
'title': 'Fixture chat ${i + 1}',
|
||||
'directory': '/workspace/demo',
|
||||
},
|
||||
]);
|
||||
}
|
||||
final home = ChatSessionsScreen(gateway: gateway, onOpen: (_) {});
|
||||
// `?platform=cupertino` overrides the compile-time style.
|
||||
final style = Uri.base.queryParameters['platform'] ?? _probeStyle;
|
||||
if (style == 'cupertino') {
|
||||
runApp(
|
||||
CupertinoApp(
|
||||
theme: CupertinoThemeData(
|
||||
|
||||
Reference in New Issue
Block a user