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

Remove improveosm oneway suspects quest #5725

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import de.westnordost.streetcomplete.data.user.statistics.statisticsModule
import de.westnordost.streetcomplete.data.user.userModule
import de.westnordost.streetcomplete.data.visiblequests.questPresetsModule
import de.westnordost.streetcomplete.overlays.overlaysModule
import de.westnordost.streetcomplete.quests.oneway_suspects.data.trafficFlowSegmentsModule
import de.westnordost.streetcomplete.quests.questsModule
import de.westnordost.streetcomplete.screens.about.aboutScreenModule
import de.westnordost.streetcomplete.screens.main.mainModule
Expand Down Expand Up @@ -128,7 +127,6 @@ class StreetCompleteApplication : Application() {
questsModule,
settingsModule,
statisticsModule,
trafficFlowSegmentsModule,
uploadModule,
userModule,
arModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ import de.westnordost.streetcomplete.data.user.statistics.EditTypeStatisticsTabl
import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable
import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderTable
import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable
import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable

/** Creates the database and upgrades it */
object DatabaseInitializer {
const val DB_VERSION = 17
const val DB_VERSION = 18

fun onCreate(db: Database) {
// OSM notes
Expand Down Expand Up @@ -96,9 +95,6 @@ object DatabaseInitializer {
db.exec(UserLinksTable.CREATE)
db.exec(ActiveDaysTable.CREATE)

// quest specific tables
db.exec(WayTrafficFlowTable.CREATE)

// logs
db.exec(LogsTable.CREATE)
db.exec(LogsTable.INDEX_CREATE)
Expand Down Expand Up @@ -248,6 +244,9 @@ object DatabaseInitializer {
if (oldVersion <= 16 && newVersion > 16) {
db.renameQuest("AddProhibitedForMoped", "AddMopedAccess")
}
if (oldVersion <= 17 && newVersion > 17) {
db.exec("DROP TABLE direction_of_flow;")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry
import de.westnordost.streetcomplete.quests.address.AddHousenumber
import de.westnordost.streetcomplete.quests.cycleway.AddCycleway
import de.westnordost.streetcomplete.quests.existence.CheckExistence
import de.westnordost.streetcomplete.quests.oneway_suspects.AddSuspectedOneway
import de.westnordost.streetcomplete.quests.opening_hours.AddOpeningHours
import de.westnordost.streetcomplete.quests.place_name.AddPlaceName
import de.westnordost.streetcomplete.util.Listeners
Expand Down Expand Up @@ -422,7 +421,6 @@ class OsmQuestController internal constructor(
* all have to wait for that one thread. So, better enqueue the expensive work at the beginning. */
private val OsmElementQuestType<*>.chonkerIndex: Int get() = when (this) {
is AddOpeningHours -> 0 // OpeningHoursParser, extensive filter
is AddSuspectedOneway -> 0 // Download, IO
is CheckExistence -> 1 // FeatureDictionary, extensive filter
is AddHousenumber -> 1 // complex filter
is AddCycleway -> 2 // complex filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ import de.westnordost.streetcomplete.quests.moped.AddMopedAccess
import de.westnordost.streetcomplete.quests.motorcycle_parking_capacity.AddMotorcycleParkingCapacity
import de.westnordost.streetcomplete.quests.motorcycle_parking_cover.AddMotorcycleParkingCover
import de.westnordost.streetcomplete.quests.oneway.AddOneway
import de.westnordost.streetcomplete.quests.oneway_suspects.AddSuspectedOneway
import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsApi
import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowDao
import de.westnordost.streetcomplete.quests.opening_hours.AddOpeningHours
import de.westnordost.streetcomplete.quests.opening_hours_signed.CheckOpeningHoursSigned
import de.westnordost.streetcomplete.quests.orchard_produce.AddOrchardProduce
Expand Down Expand Up @@ -187,12 +184,9 @@ import org.koin.dsl.module

val questsModule = module {
factory { RoadNameSuggestionsSource(get()) }
factory { WayTrafficFlowDao(get()) }

single {
questTypeRegistry(
get(),
get(),
get(),
{ location ->
val countryInfos = get<CountryInfos>()
Expand All @@ -207,8 +201,6 @@ val questsModule = module {
}

fun questTypeRegistry(
trafficFlowSegmentsApi: TrafficFlowSegmentsApi,
trafficFlowDao: WayTrafficFlowDao,
arSupportChecker: ArSupportChecker,
getCountryInfoByLocation: (LatLon) -> CountryInfo,
getFeature: (Element) -> Feature?,
Expand Down Expand Up @@ -427,7 +419,6 @@ fun questTypeRegistry(
95 to AddMaxPhysicalHeight(arSupportChecker), // same as above, best if it appears right after (if enabled)
96 to AddRoadName(),
97 to AddOneway(),
98 to AddSuspectedOneway(trafficFlowSegmentsApi, trafficFlowDao),

99 to AddEntrance(),
100 to AddEntranceReference(),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading