Include town
name, when available, in user location
name
This commit is contained in:
parent
cb07a5d708
commit
992f16a685
1 changed files with 3 additions and 6 deletions
|
@ -29,12 +29,9 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
name_parts = []
|
||||
components = result["components"]
|
||||
if "city" in components:
|
||||
name_parts.append(components["city"])
|
||||
if "state" in components:
|
||||
name_parts.append(components["state"])
|
||||
if "country" in components:
|
||||
name_parts.append(components["country"])
|
||||
for part in ["town", "city", "state", "country"]:
|
||||
if part in components:
|
||||
name_parts.append(components[part])
|
||||
|
||||
if not name_parts:
|
||||
name_parts.append(result["formatted"])
|
||||
|
|
Loading…
Reference in a new issue