fix accessing the UI thread when updating the total target label
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
@@ -71,11 +71,11 @@ public class TargetFilterCountMessageLabel extends Label {
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final CustomFilterUIEvent custFUIEvent) {
|
||||
if (custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY
|
||||
|| custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
|
||||
if (custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
|
||||
|| custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK
|
||||
|| custFUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW) {
|
||||
displayTargetFilterMessage();
|
||||
|| custFUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW
|
||||
|| custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY) {
|
||||
this.getUI().access(() -> displayTargetFilterMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ public class TargetFilterCountMessageLabel extends Label {
|
||||
long totalTargets = 0;
|
||||
if (filterManagementUIState.isCreateFilterViewDisplayed() || filterManagementUIState.isEditViewDisplayed()) {
|
||||
if (null != filterManagementUIState.getFilterQueryValue()) {
|
||||
totalTargets = targetManagement.countTargetByTargetFilterQuery(filterManagementUIState
|
||||
.getFilterQueryValue());
|
||||
totalTargets = targetManagement
|
||||
.countTargetByTargetFilterQuery(filterManagementUIState.getFilterQueryValue());
|
||||
}
|
||||
final StringBuilder targetMessage = new StringBuilder(i18n.get("label.target.filtered.total"));
|
||||
if (filterManagementUIState.getTargetsTruncated() != null) {
|
||||
|
||||
Reference in New Issue
Block a user