suggestion regarding always setting the "in progress" to false and resetting the "busy" indicator

Change-Id: Ica225b6a44d1f70968d09bb37a76fc23956c0fea
This commit is contained in:
Axel Uhl committed 2016-07-20 13:57:43 +02:00
1 parent 3f47f56985
commit f6fd637c99
1 file changed
+13 -14
@@ -166,22 +166,21 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
setExpanded(!isExpanded());
ensureExpansionDataIsLoaded(new Runnable() {
public void run() {
if(!isExpanded()) {
// column was collapsed meanwhile, so that the columns must not be added to the table right now
return;
}
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted asynchronously
// while toggling the columns.
if (insertIndex != -1) {
insertIndex++;
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
column.updateMinMax();
if(table.getColumnIndex(column) < 0) {
getLeaderboardPanel().insertColumn(insertIndex++, column);
// column may have been collapsed meanwhile, so that the columns must not be added to the table right now
if (isExpanded()) {
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted asynchronously
// while toggling the columns.
if (insertIndex != -1) {
insertIndex++;
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
column.updateMinMax();
if (table.getColumnIndex(column) < 0) {
getLeaderboardPanel().insertColumn(insertIndex++, column);
}
}
getLeaderboardPanel().getLeaderboardTable().redraw();
}
getLeaderboardPanel().getLeaderboardTable().redraw();
}
getLeaderboardPanel().setBusyState(oldBusyState);
setTogglingInProcess(false);