Changeset 17855 in josm for trunk/src/org
- Timestamp:
- 2021-05-02T10:05:54+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/notes/Note.java
r17837 r17855 11 11 12 12 import org.openstreetmap.josm.data.coor.LatLon; 13 14 import javax.annotation.Nullable; 13 15 14 16 /** … … 159 161 * @since 11821 160 162 */ 163 @Nullable 161 164 public NoteComment getLastComment() { 162 165 return comments.isEmpty() ? null : comments.get(comments.size()-1); … … 175 178 * @return First comment object 176 179 */ 180 @Nullable 177 181 public NoteComment getFirstComment() { 178 182 return comments.isEmpty() ? null : comments.get(0); 179 183 } 180 184 185 @Nullable 181 186 private String getUserName() { 182 187 return getFirstComment() == null ? null : getFirstComment().getUser().getName(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
r17768 r17855 248 248 } 249 249 return Pattern.compile("\\s+").splitAsStream(filter).allMatch(string -> { 250 NoteComment lastComment = note.getLastComment(); 250 251 switch (string) { 251 252 case "open": … … 254 255 return note.getState() == State.CLOSED; 255 256 case "reopened": 256 return note.getLastComment().getNoteAction() == NoteComment.Action.REOPENED;257 return lastComment != null && lastComment.getNoteAction() == NoteComment.Action.REOPENED; 257 258 case "new": 258 259 return note.getId() < 0; 259 260 case "modified": 260 return note.getLastComment().isNew();261 return lastComment != null && lastComment.isNew(); 261 262 default: 262 263 return note.getComments().toString().contains(string);
Note:
See TracChangeset
for help on using the changeset viewer.