Fixed Reader and Writers GUIs still displaying channels even if not connected, fixes #1452

This commit is contained in:
raoulvdberge
2017-09-08 12:36:53 +02:00
parent 99eb135646
commit 400d98043e
3 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ public interface IGuiReaderWriter {
INetwork getNetwork();
boolean canUpdate();
boolean isActive();
default void onAdd(String name) {
INetwork network = getNetwork();

View File

@@ -195,6 +195,6 @@ public class GuiReaderWriter extends GuiBase {
}
private List<String> getChannels() {
return readerWriter.canUpdate() ? CHANNELS : Collections.emptyList();
return readerWriter.isActive() ? CHANNELS : Collections.emptyList();
}
}