mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 11:55:52 -04:00
fix(feedback): incorrect action when clicking blank space. Closes #1087.
This commit is contained in:
parent
5ad46279c2
commit
6fc60f1387
@ -121,9 +121,10 @@ public class FeedbackPage extends VBox implements PageAware {
|
|||||||
private final TwoLineListItem content = new TwoLineListItem();
|
private final TwoLineListItem content = new TwoLineListItem();
|
||||||
private final JFXButton likeButton = new JFXButton();
|
private final JFXButton likeButton = new JFXButton();
|
||||||
private final JFXButton unlikeButton = new JFXButton();
|
private final JFXButton unlikeButton = new JFXButton();
|
||||||
|
private final HBox container;
|
||||||
|
|
||||||
{
|
{
|
||||||
HBox container = new HBox(8);
|
container = new HBox(8);
|
||||||
container.setPickOnBounds(false);
|
container.setPickOnBounds(false);
|
||||||
container.setAlignment(Pos.CENTER_LEFT);
|
container.setAlignment(Pos.CENTER_LEFT);
|
||||||
HBox.setHgrow(content, Priority.ALWAYS);
|
HBox.setHgrow(content, Priority.ALWAYS);
|
||||||
@ -151,18 +152,15 @@ public class FeedbackPage extends VBox implements PageAware {
|
|||||||
"#" + feedback.getId(),
|
"#" + feedback.getId(),
|
||||||
i18n("feedback.state." + feedback.getState().name().toLowerCase(Locale.US)),
|
i18n("feedback.state." + feedback.getState().name().toLowerCase(Locale.US)),
|
||||||
i18n("feedback.type." + feedback.getType().name().toLowerCase(Locale.US)));
|
i18n("feedback.type." + feedback.getType().name().toLowerCase(Locale.US)));
|
||||||
|
container.setOnMouseClicked(e -> {
|
||||||
|
getFeedback(feedback.getId())
|
||||||
|
.thenAcceptAsync(Schedulers.javafx(), f -> {
|
||||||
|
Controllers.dialog(new ViewFeedbackDialog(f));
|
||||||
|
})
|
||||||
|
.start();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
listView.setOnMouseClicked(e -> {
|
|
||||||
if (listView.getSelectionModel().getSelectedIndex() < 0)
|
|
||||||
return;
|
|
||||||
FeedbackResponse selectedItem = listView.getSelectionModel().getSelectedItem();
|
|
||||||
getFeedback(selectedItem.getId())
|
|
||||||
.thenAcceptAsync(Schedulers.javafx(), f -> {
|
|
||||||
Controllers.dialog(new ViewFeedbackDialog(f));
|
|
||||||
})
|
|
||||||
.start();
|
|
||||||
});
|
|
||||||
|
|
||||||
getChildren().add(spinnerPane);
|
getChildren().add(spinnerPane);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user