fix: count only OpenChamber projects as known work areas
0.7.3 still showed the pitchfork/Downloads/OpenCode ports because app.projects also carries every OpenCode project. The web filters against the OpenChamber project list, so the phone now uses only rows with a settings record (metaId) plus the current directory; directory-less announced servers stay visible. The list now matches the web's two entries (8080 and 9090). Version 0.7.4+704.
This commit is contained in:
1 parent
4bd9256ef8
commit
cecf5517a5
4 files changed
+16
-3
No files matched your search
@@ -188,8 +188,12 @@ class _BrowserPanelState extends State<BrowserPanel> {
|
||||
// ports" too.
|
||||
final known = <String>[
|
||||
if (widget.directory.isNotEmpty) widget.directory,
|
||||
// Only OpenChamber's own project list counts as work, as on the web;
|
||||
// an OpenCode project that happens to exist under ~/Downloads or a
|
||||
// tool's config directory is still outside the user's projects.
|
||||
for (final project in widget.app.projects)
|
||||
if (project.canonical.isNotEmpty) project.canonical,
|
||||
if (project.canonical.isNotEmpty && project.metaId.isNotEmpty)
|
||||
project.canonical,
|
||||
];
|
||||
bool knownDirectory(String directory) {
|
||||
if (directory.isEmpty || known.isEmpty) return true;
|
||||
|
||||
Reference in new issue
Block a user