mirror of
https://github.com/xpipe-io/xpipe.git
synced 2025-04-19 02:33:39 +00:00
Add more logging for layout content loading [stage]
This commit is contained in:
parent
484028f22f
commit
bffe75a540
6 changed files with 19 additions and 6 deletions
|
@ -207,7 +207,7 @@ public class BrowserFileSystemTabComp extends SimpleComp {
|
|||
home,
|
||||
model.getCurrentPath().isNull(),
|
||||
fileList,
|
||||
model.getCurrentPath().isNull().not()));
|
||||
model.getCurrentPath().isNull().not()), false);
|
||||
var r = stack.styleClass("browser-content-container").createRegion();
|
||||
r.focusedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue) {
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BrowserHistoryTabComp extends SimpleComp {
|
|||
var map = new LinkedHashMap<Comp<?>, ObservableValue<Boolean>>();
|
||||
map.put(emptyDisplay, empty);
|
||||
map.put(contentDisplay, empty.not());
|
||||
var stack = new MultiContentComp(map);
|
||||
var stack = new MultiContentComp(map, false);
|
||||
return stack.createRegion();
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class AppLayoutComp extends Comp<AppLayoutComp.Structure> {
|
|||
return model.getSelected().getValue().equals(entry);
|
||||
},
|
||||
model.getSelected())));
|
||||
var multi = new MultiContentComp(map);
|
||||
var multi = new MultiContentComp(map, true);
|
||||
multi.styleClass("background");
|
||||
|
||||
var pane = new BorderPane();
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.xpipe.app.comp.base;
|
|||
|
||||
import io.xpipe.app.comp.Comp;
|
||||
import io.xpipe.app.comp.SimpleComp;
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
import io.xpipe.app.util.PlatformThread;
|
||||
|
||||
import javafx.beans.value.ObservableValue;
|
||||
|
@ -15,9 +16,11 @@ import java.util.Map;
|
|||
|
||||
public class MultiContentComp extends SimpleComp {
|
||||
|
||||
private final boolean log;
|
||||
private final Map<Comp<?>, ObservableValue<Boolean>> content;
|
||||
|
||||
public MultiContentComp(Map<Comp<?>, ObservableValue<Boolean>> content) {
|
||||
public MultiContentComp(Map<Comp<?>, ObservableValue<Boolean>> content, boolean log) {
|
||||
this.log = log;
|
||||
this.content = FXCollections.observableMap(content);
|
||||
}
|
||||
|
||||
|
@ -34,7 +37,14 @@ public class MultiContentComp extends SimpleComp {
|
|||
});
|
||||
|
||||
for (Map.Entry<Comp<?>, ObservableValue<Boolean>> e : content.entrySet()) {
|
||||
var name = e.getKey().getClass().getSimpleName();
|
||||
if (log) {
|
||||
TrackEvent.trace("Creating content tab region for element " + name);
|
||||
}
|
||||
var r = e.getKey().createRegion();
|
||||
if (log) {
|
||||
TrackEvent.trace("Created content tab region for element " + name);
|
||||
}
|
||||
e.getValue().subscribe(val -> {
|
||||
PlatformThread.runLaterIfNeeded(() -> {
|
||||
r.setManaged(val);
|
||||
|
@ -42,6 +52,9 @@ public class MultiContentComp extends SimpleComp {
|
|||
});
|
||||
});
|
||||
m.put(e.getKey(), r);
|
||||
if (log) {
|
||||
TrackEvent.trace("Added content tab region for element " + name);
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
|
|
@ -142,6 +142,6 @@ public class StoreEntryListComp extends SimpleComp {
|
|||
map.put(new StoreScriptsIntroComp(scriptsIntroShowing), showScriptsIntro);
|
||||
map.put(new StoreIdentitiesIntroComp(), showIdentitiesIntro);
|
||||
|
||||
return new MultiContentComp(map).createRegion();
|
||||
return new MultiContentComp(map, false).createRegion();
|
||||
}
|
||||
}
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
15.6-4
|
||||
15.6-5
|
||||
|
|
Loading…
Add table
Reference in a new issue