Simplify getNativeEvent().getKeyCode() to getNativeKeyCode()
For KeyDownEvent and KeyUpEvent, the latter is just a shorthand for the former. Unfortunately, KeyPressEvent doesn't have this shorthand. Change-Id: I6dc37b93cf09be5cfa58bbb5fcc81d7f4b9a09e5
This commit is contained in:
@@ -126,7 +126,7 @@ public class GroupListScreen extends Screen {
|
||||
@Override
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
Query q = new Query(filterTxt.getValue())
|
||||
.open(event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER);
|
||||
.open(event.getNativeKeyCode() == KeyCodes.KEY_ENTER);
|
||||
if (match.equals(q.qMatch)) {
|
||||
q.start(start);
|
||||
}
|
||||
|
@@ -183,7 +183,7 @@ public class ProjectListScreen extends PaginatedProjectScreen {
|
||||
@Override
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
Query q = new Query(filterTxt.getValue())
|
||||
.open(event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER);
|
||||
.open(event.getNativeKeyCode() == KeyCodes.KEY_ENTER);
|
||||
if (match.equals(q.qMatch)) {
|
||||
q.start(start);
|
||||
}
|
||||
|
Reference in New Issue
Block a user