forked from MapComplete/MapComplete
Chore: Remove unused variables
This commit is contained in:
parent
1a415f4815
commit
e68b31e267
42 changed files with 48 additions and 106 deletions
|
@ -159,7 +159,6 @@ export default class FavouritesFeatureSource extends StaticFeatureSource {
|
|||
|
||||
public removeFavourite(feature: Feature, tags?: UIEventSource<Record<string, string>>) {
|
||||
const id = feature.properties.id.replace("/", "-")
|
||||
const pref = this._osmConnection.GetPreference("favourite-" + id)
|
||||
this._osmConnection.preferencesHandler.removeAllWithPrefix("mapcomplete-favourite-" + id)
|
||||
if (tags) {
|
||||
delete tags.data._favourite
|
||||
|
|
|
@ -46,7 +46,6 @@ export default class LayoutSource extends FeatureSourceMerger {
|
|||
)
|
||||
|
||||
const overpassSource = LayoutSource.setupOverpass(
|
||||
backend,
|
||||
osmLayers,
|
||||
bounds,
|
||||
zoom,
|
||||
|
@ -132,7 +131,6 @@ export default class LayoutSource extends FeatureSourceMerger {
|
|||
}
|
||||
|
||||
private static setupOverpass(
|
||||
backend: string,
|
||||
osmLayers: LayerConfig[],
|
||||
bounds: Store<BBox>,
|
||||
zoom: Store<number>,
|
||||
|
|
|
@ -48,7 +48,7 @@ export default class NearbyFeatureSource implements FeatureSource {
|
|||
flayer.layerDef.minzoom,
|
||||
flayer.isDisplayed
|
||||
)
|
||||
calcSource.addCallbackAndRunD((features) => {
|
||||
calcSource.addCallbackAndRunD(() => {
|
||||
this.update()
|
||||
})
|
||||
this._allSources.push(calcSource)
|
||||
|
|
|
@ -103,7 +103,7 @@ export default class OverpassFeatureSource implements FeatureSource {
|
|||
if (!result) {
|
||||
return
|
||||
}
|
||||
const [bounds, date, updatedLayers] = result
|
||||
const [bounds, _, _] = result
|
||||
this._lastQueryBBox = bounds
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ export class Mapillary extends ImageProvider {
|
|||
return [this.PrepareUrlAsync(key, value)]
|
||||
}
|
||||
|
||||
public async DownloadAttribution(url: string): Promise<LicenseInfo> {
|
||||
public async DownloadAttribution(_: string): Promise<LicenseInfo> {
|
||||
const license = new LicenseInfo()
|
||||
license.artist = undefined
|
||||
license.license = "CC BY-SA 4.0"
|
||||
|
|
|
@ -416,7 +416,7 @@ export class OsmConnection {
|
|||
): Promise<{ id: number }> {
|
||||
if (this._dryRun.data) {
|
||||
console.warn("Dryrun enabled - not actually uploading GPX ", gpx)
|
||||
return new Promise<{ id: number }>((ok, error) => {
|
||||
return new Promise<{ id: number }>((ok) => {
|
||||
window.setTimeout(
|
||||
() => ok({ id: Math.floor(Math.random() * 1000) }),
|
||||
Math.random() * 5000
|
||||
|
|
|
@ -615,7 +615,7 @@ export default class SimpleMetaTaggers {
|
|||
isLazy: true,
|
||||
includesDates: true,
|
||||
},
|
||||
(feature, layer, tagsStore) => {
|
||||
(feature) => {
|
||||
Utils.AddLazyProperty(feature.properties, "_last_edit:passed_time", () => {
|
||||
const lastEditTimestamp = new Date(
|
||||
feature.properties["_last_edit:timestamp"]
|
||||
|
|
|
@ -20,11 +20,11 @@ export default class ComparingTag implements TagsFilter {
|
|||
this._boundary = boundary
|
||||
}
|
||||
|
||||
asChange(properties: Record<string, string>): { k: string; v: string }[] {
|
||||
asChange(_: Record<string, string>): { k: string; v: string }[] {
|
||||
throw "A comparable tag can not be used to be uploaded to OSM"
|
||||
}
|
||||
|
||||
asHumanString(linkToWiki: boolean, shorten: boolean, properties: Record<string, string>) {
|
||||
asHumanString() {
|
||||
return this._key + this._representation + this._boundary
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ export default class ThemeViewStateHashActor {
|
|||
private loadStateFromHash(hash: string) {
|
||||
const state = this._state
|
||||
const parts = hash.split(":")
|
||||
outer: for (const { toggle, name, showOverOthers, submenu } of state.guistate.allToggles) {
|
||||
outer: for (const { toggle, name, submenu } of state.guistate.allToggles) {
|
||||
for (const part of parts) {
|
||||
if (part === name) {
|
||||
toggle.setData(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue