Skip to content

Commit

Permalink
Refactor code to make it more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuhn committed Jul 11, 2023
1 parent 5fbdcfc commit a469855
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/java/com/knowledgepixels/nanodash/TitleBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,9 @@ public TitleBar(String id, NanodashPage page) {
super(id);
add(new ProfileItem("profile", page));

WebMarkupContainer mychannel = new WebMarkupContainer("mychannel");
mychannel.setVisible(!NanodashPreferences.get().isReadOnlyMode());
add(mychannel);

WebMarkupContainer connectors = new WebMarkupContainer("connectors");
connectors.setVisible(ConnectorListPage.getConnectorCount() > 0);
add(connectors);

WebMarkupContainer publish = new WebMarkupContainer("publish");
publish.setVisible(!NanodashPreferences.get().isReadOnlyMode());
add(publish);
add(new WebMarkupContainer("mychannel").setVisible(!NanodashPreferences.get().isReadOnlyMode()));
add(new WebMarkupContainer("connectors").setVisible(ConnectorListPage.getConnectorCount() > 0));
add(new WebMarkupContainer("publish").setVisible(!NanodashPreferences.get().isReadOnlyMode()));
}

}

0 comments on commit a469855

Please sign in to comment.