Add a 'spectators allowed' option for regular tables (aka non tournaments).

This commit is contained in:
spjspj 2018-03-08 23:31:51 +11:00
parent be70ecd7f3
commit 4c7b0d50d2
6 changed files with 49 additions and 9 deletions

View file

@ -1444,11 +1444,14 @@ class TableTableModel extends AbstractTableModel {
if (tables[arg0].isTournament()) {
return "Show";
} else {
owner = tables[arg0].getControllerName();
owner = tables[arg0].getControllerName();
if (SessionHandler.getSession() != null && owner.equals(SessionHandler.getUserName())) {
return "";
}
return "Watch";
if (tables[arg0].getSpectatorsAllowed()) {
return "Watch";
}
return "";
}
default:
return "";