mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-15 08:41:01 +00:00
removed unnecessary redundancy between removeLeaderboardGroups and removeLeaderboardGroup
This commit is contained in:
1 parent
ae614a3402
commit
6f73e766dc
4 files changed
+8
-10
No files matched your search
+7
-1
@@ -556,6 +556,12 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel implements
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* If no leaderboard group is selected or more than one is selected, this method is a no-op because the
|
||||
* leaderboard list displayed is defined to the be list of all leaderboards available, excluding those
|
||||
* leaderboards that are already assigned to <em>the</em> selected leaderboard group. In other words,
|
||||
* the leaderboard list is only well-defined in case a single leaderboard group is selected.
|
||||
*/
|
||||
private void refreshLeaderboardsList() {
|
||||
final LeaderboardGroupDTO selectedGroup = getSelectedGroup();
|
||||
final Set<StrippedLeaderboardDTO> selectedLeaderboards = leaderboardsSelectionModel.getSelectedSet();
|
||||
@@ -699,7 +705,7 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel implements
|
||||
}
|
||||
|
||||
private void removeLeaderboardGroup(final LeaderboardGroupDTO group) {
|
||||
sailingService.removeLeaderboardGroup(group.getName(), new AsyncCallback<Void>() {
|
||||
sailingService.removeLeaderboardGroups(Collections.singleton(group.getName()), new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
errorReporter.reportError("Error trying to remove leaderboard group " + group.getName() + ": "
|
||||
|
||||
-2
@@ -215,8 +215,6 @@ public interface SailingService extends RemoteService {
|
||||
|
||||
void renameLeaderboardGroup(String oldName, String newName);
|
||||
|
||||
void removeLeaderboardGroup(String groupName);
|
||||
|
||||
void removeLeaderboardGroups(Set<String> groupNames);
|
||||
|
||||
LeaderboardGroupDTO createLeaderboardGroup(String groupName, String description,
|
||||
|
||||
-5
@@ -265,11 +265,6 @@ public interface SailingServiceAsync {
|
||||
*/
|
||||
void renameLeaderboardGroup(String oldName, String newName, AsyncCallback<Void> callback);
|
||||
|
||||
/**
|
||||
* Removes the leaderboard group with the name <code>groupName</code> from the service and the persistant store.
|
||||
*/
|
||||
void removeLeaderboardGroup(String groupName, AsyncCallback<Void> callback);
|
||||
|
||||
/**
|
||||
* Removes the leaderboard groups with the given names from the service and the persistant store.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -2462,8 +2462,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLeaderboardGroup(String groupName) {
|
||||
private void removeLeaderboardGroup(String groupName) {
|
||||
getService().apply(new RemoveLeaderboardGroup(groupName));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user