Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changesets refactor #1329

Merged
merged 73 commits into from
Sep 4, 2019
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0736d29
Merge branch 'master' into changesets-refactor
westnordost Feb 10, 2019
35f0065
Merge branch 'master' into changesets-refactor
westnordost Feb 24, 2019
9a423e0
wip split way at...
westnordost Feb 27, 2019
c555503
more null-safety
westnordost Mar 8, 2019
98d01db
slightly different wording for traffic signals button quest (fixes #1…
westnordost Mar 22, 2019
8f34703
update dependencies
westnordost Mar 22, 2019
5da9898
Merge branch 'master' into changesets-refactor
westnordost Jun 8, 2019
f2111a0
work on split way upload
westnordost Jun 17, 2019
1e8eeb5
special handling for circular ways
westnordost Jun 22, 2019
b63a4b6
add more tests
westnordost Jun 23, 2019
d16aea1
add tests and fixes
westnordost Jun 23, 2019
666757a
treat role "from" and "to" with "via" the same regardless of relation…
westnordost Jun 24, 2019
490e529
solve the modification aware stuff in osmapi
westnordost Jun 26, 2019
ed937a4
update to new osmapi version
westnordost Jun 26, 2019
c8d75d5
fix create split position at 18th meridian
westnordost Jun 29, 2019
ef9044b
Merge branch 'master' into changesets-refactor
westnordost Jun 29, 2019
4317c3a
Merge branch 'master' into changesets-refactor
westnordost Jul 7, 2019
319881d
work in progress upload refactor
westnordost Jul 10, 2019
8ed1f0b
work in progress upload refactor
westnordost Jul 25, 2019
9f34334
Merge branch 'master' into changesets-refactor
westnordost Aug 7, 2019
f6b8881
fix a few tests
westnordost Aug 7, 2019
ef8e013
replace tabs with spaces
westnordost Aug 7, 2019
c29feb7
fix tests
westnordost Aug 10, 2019
b487d6e
add common superclass for all uploads into changesets
westnordost Aug 11, 2019
2200205
remove superfluous test class
westnordost Aug 11, 2019
fae8524
set visible quest listener
westnordost Aug 11, 2019
bfa0bd9
correct setting of cancelSate
westnordost Aug 11, 2019
13211b3
work on UI part of the splitting
westnordost Aug 18, 2019
470dabe
More shadow on the marker
westnordost Aug 18, 2019
b83044c
larger click area
westnordost Aug 18, 2019
981e9e4
rename OsmQuestSplitWayDao.id to .questId
westnordost Aug 19, 2019
703fd5e
replace NotNull annotation with NonNull
westnordost Aug 19, 2019
b90cf13
add test for LatLon extension function (and fix bug)
westnordost Aug 19, 2019
6986cb7
add some tests
westnordost Aug 19, 2019
ddfe6f7
add test
westnordost Aug 20, 2019
de8a9b4
add test
westnordost Aug 20, 2019
594f4b1
add some comments
westnordost Aug 21, 2019
1c8aeb9
add some comments
westnordost Aug 21, 2019
dd978cc
handle (very unlikely) exception
westnordost Aug 21, 2019
1b00bbf
remove unused function
westnordost Aug 22, 2019
fb1e1ef
add tests
westnordost Aug 22, 2019
1790391
Merge branch 'master' into changesets-refactor
westnordost Aug 22, 2019
a5584fc
add animation on cut
westnordost Aug 24, 2019
f287665
snip sound a little later
westnordost Aug 24, 2019
be67f57
better snip animation
westnordost Aug 24, 2019
30bdd4c
add test
westnordost Aug 24, 2019
8121451
clear marker ids
westnordost Aug 24, 2019
85fbbee
dont close split way dialog when clicking quest
westnordost Aug 24, 2019
03a32d3
don't show scissors on top of buttons etc.
westnordost Aug 24, 2019
e64fdf3
fix crash
westnordost Aug 24, 2019
a4a918c
show quest solved animation for splitting way
westnordost Aug 24, 2019
6121802
fix upload
westnordost Aug 24, 2019
90e6048
fix test
westnordost Aug 24, 2019
83644da
cover more test cases
westnordost Aug 25, 2019
5767ea8
one split position may map to several split nodes
westnordost Aug 25, 2019
0d1d377
don't offer ability to split the way on areas (i.e. surface of a plaza)
westnordost Aug 25, 2019
6df9cff
fix unsynced split way seemingly gone after reopening app
westnordost Aug 26, 2019
908d982
fix correctly splitting restriction relations with multiple via ways
westnordost Aug 27, 2019
e87c0a7
do not show option to split way for closed roundabouts
westnordost Aug 28, 2019
4c6c71e
fix form for landscape layout
westnordost Aug 28, 2019
59a8c71
enhance text
westnordost Aug 28, 2019
a6272c8
Merge branch 'master' into changesets-refactor
westnordost Aug 28, 2019
4154b74
update feature names
westnordost Aug 28, 2019
1baafe2
add confirmation dialog if there are many splits
westnordost Aug 28, 2019
578aef3
Update app/src/main/res/values/strings.xml
westnordost Aug 29, 2019
12f639d
do not require user to zoom in further if it is not possible
westnordost Aug 29, 2019
1b58a84
Merge branch 'master' into changesets-refactor
westnordost Aug 29, 2019
2184be7
only activate photos attached to note if there are any
westnordost Sep 1, 2019
e5fe906
allow Element.copy to copy with null-tags
westnordost Sep 1, 2019
c79bd52
correctly update elements after split
westnordost Sep 1, 2019
00d471f
correctly update elements after split (2)
westnordost Sep 4, 2019
1cb30d7
QuestGiver shall only create quests that are currently visible
westnordost Sep 4, 2019
50d3823
fix tests
westnordost Sep 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add more tests
westnordost committed Jun 23, 2019
commit b63a4b666e69dc3be606157332c15260d3a581c1
Original file line number Diff line number Diff line change
@@ -155,17 +155,23 @@ class SplitWayUpload @Inject constructor(private val osmDao: MapDataDao) {
/** returns null if the relation is not ordered, false if oriented backwards, true if oriented forward */
private fun Way.isOrientedForwardInOrderedRelation(relation: Relation): Boolean? {
val wayIdsInRelation = relation.members.filter { it.type == WAY }.map { it.ref }
if (wayIdsInRelation.size < 2) return null

val index = wayIdsInRelation.indexOfFirst { it == id }
if (index == -1)
throw IllegalArgumentException("Way #$id is not in relation #${relation.id}")

val wayBefore = osmDao.getWay(wayIdsInRelation.wrapGet(index - 1))
if (isAfterWayInChain(wayBefore)) return true
if (isBeforeWayInChain(wayBefore)) return false
if (wayBefore != null) {
if (isAfterWayInChain(wayBefore)) return true
if (isBeforeWayInChain(wayBefore)) return false
}

val wayAfter = osmDao.getWay(wayIdsInRelation.wrapGet(index + 1))
if (isBeforeWayInChain(wayAfter)) return true
if (isAfterWayInChain(wayAfter)) return false
if (wayAfter != null) {
if (isBeforeWayInChain(wayAfter)) return true
if (isAfterWayInChain(wayAfter)) return false
}

return null
}
Loading