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)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
void onEvent(final CustomFilterUIEvent custFUIEvent) {
|
void onEvent(final CustomFilterUIEvent custFUIEvent) {
|
||||||
if (custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY
|
if (custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
|
||||||
|| custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
|
|
||||||
|| custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK
|
|| custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK
|
||||||
|| custFUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW) {
|
|| custFUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW
|
||||||
displayTargetFilterMessage();
|
|| custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY) {
|
||||||
|
this.getUI().access(() -> displayTargetFilterMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,8 +89,8 @@ public class TargetFilterCountMessageLabel extends Label {
|
|||||||
long totalTargets = 0;
|
long totalTargets = 0;
|
||||||
if (filterManagementUIState.isCreateFilterViewDisplayed() || filterManagementUIState.isEditViewDisplayed()) {
|
if (filterManagementUIState.isCreateFilterViewDisplayed() || filterManagementUIState.isEditViewDisplayed()) {
|
||||||
if (null != filterManagementUIState.getFilterQueryValue()) {
|
if (null != filterManagementUIState.getFilterQueryValue()) {
|
||||||
totalTargets = targetManagement.countTargetByTargetFilterQuery(filterManagementUIState
|
totalTargets = targetManagement
|
||||||
.getFilterQueryValue());
|
.countTargetByTargetFilterQuery(filterManagementUIState.getFilterQueryValue());
|
||||||
}
|
}
|
||||||
final StringBuilder targetMessage = new StringBuilder(i18n.get("label.target.filtered.total"));
|
final StringBuilder targetMessage = new StringBuilder(i18n.get("label.target.filtered.total"));
|
||||||
if (filterManagementUIState.getTargetsTruncated() != null) {
|
if (filterManagementUIState.getTargetsTruncated() != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user