Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Feb 3, 2025
1 parent eda70a4 commit 141ac49
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ class OsmNoteQuestController(
settingsListener = prefs.onAllShowNotesChanged { onInvalidated() }
}

override fun get(questId: Long): OsmNoteQuest? {
return noteSource.get(questId)?.let { createQuestForNote(it) }
}
override fun get(questId: Long): OsmNoteQuest? =
noteSource.get(questId)?.let { createQuestForNote(it) }

override fun getAllInBBox(bbox: BoundingBox): List<OsmNoteQuest> =
createQuestsForNotes(noteSource.getAll(bbox))

private fun createQuestsForNotes(notes: Collection<Note>): List<OsmNoteQuest> {
return notes.mapNotNull { createQuestForNote(it) }
}
private fun createQuestsForNotes(notes: Collection<Note>): List<OsmNoteQuest> =
notes.mapNotNull { createQuestForNote(it) }

private fun createQuestForNote(note: Note): OsmNoteQuest? =
if (note.shouldShowAsQuest(userDataSource.userId, showOnlyNotesPhrasedAsQuestions)) {
Expand All @@ -85,7 +83,6 @@ class OsmNoteQuestController(
null
}


/* ---------------------------------------- Listener ---------------------------------------- */

override fun addListener(listener: OsmNoteQuestSource.Listener) {
Expand Down

0 comments on commit 141ac49

Please sign in to comment.