Skip to content

feat: make the destination parameter of showDirections() be nullable.#136

Closed
ipcjs wants to merge 4 commits into
mattermoran:masterfrom
ipcjs:feature/destination-nullable
Closed

feat: make the destination parameter of showDirections() be nullable.#136
ipcjs wants to merge 4 commits into
mattermoran:masterfrom
ipcjs:feature/destination-nullable

Conversation

@ipcjs

@ipcjs ipcjs commented Nov 30, 2022

Copy link
Copy Markdown
Contributor

When it is null, use [destinationTitle] to search destination, currently only some maps support it.

  • [MapType.apple], supported
  • [MapType.google], supported
  • [MapType.googleGo], supported
  • [MapType.amap], supported
  • [MapType.baidu], supported
  • [MapType.tencent], partially supported, you need to manually click the input box to search.
  • others map not tested, fallback to [Coords.zero]

@ipcjs ipcjs changed the title make showDirectionsdestination nullable feat: make the destination parameter of showDirections() be nullable. Nov 30, 2022
val installedApps = context?.packageManager?.getInstalledApplications(0) ?: return listOf()
return maps.filter { map -> installedApps.any { app -> app.packageName == map.packageName } }
val installedPackageNames = (context?.packageManager?.getInstalledApplications(0) ?: emptyList())
.filter { it.enabled }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, I like this enabled check :)

@ondanplatform

Copy link
Copy Markdown

any update? @mattermoran

@mattermoran

Copy link
Copy Markdown
Owner

@ondanplatform I'll try to get this cleaned up and tested this weekend

@ondanplatform

Copy link
Copy Markdown

@mattermoran thanks

@ipcjs

ipcjs commented Apr 17, 2025

Copy link
Copy Markdown
Contributor Author

#195 has been updated to resolve conflicts.

@ipcjs ipcjs closed this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants