forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
c1a2126b32
commit
4c93f023dd
32 changed files with 1551 additions and 76 deletions
|
|
@ -160,8 +160,8 @@ export default class FeatureReviews {
|
|||
private readonly _testmode: Store<boolean>
|
||||
public readonly loadingAllowed: UIEventSource<boolean | null>
|
||||
private readonly _options: Readonly<{
|
||||
nameKey?: "name" | string;
|
||||
fallbackName?: string;
|
||||
nameKey?: "name" | string
|
||||
fallbackName?: string
|
||||
uncertaintyRadius?: number
|
||||
}>
|
||||
|
||||
|
|
@ -300,15 +300,21 @@ export default class FeatureReviews {
|
|||
},
|
||||
state?: SpecialVisualizationState
|
||||
): FeatureReviews {
|
||||
const key = feature.properties.id + ";" + (options?.nameKey ?? "") + ";" + (options?.fallbackName ?? "")
|
||||
const key =
|
||||
feature.properties.id +
|
||||
";" +
|
||||
(options?.nameKey ?? "") +
|
||||
";" +
|
||||
(options?.fallbackName ?? "")
|
||||
const cached = FeatureReviews._featureReviewsCache[key]
|
||||
if (cached !== undefined) {
|
||||
return cached
|
||||
}
|
||||
const themeIsSensitive = state?.theme?.enableMorePrivacy ?? false
|
||||
const settings = state?.osmConnection?.getPreference<"always" | "yes" | "ask" | "hidden">(
|
||||
"reviews-allowed"
|
||||
) ?? new ImmutableStore("yes");
|
||||
const settings =
|
||||
state?.osmConnection?.getPreference<"always" | "yes" | "ask" | "hidden">(
|
||||
"reviews-allowed"
|
||||
) ?? new ImmutableStore("yes")
|
||||
const loadingAllowed = new UIEventSource(false)
|
||||
settings.addCallbackAndRun((s) => {
|
||||
if (s === "hidden") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue