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

add locationComponent#getLastLocation #922

Conversation

samderlust
Copy link
Contributor

@samderlust samderlust commented Feb 26, 2022

mapbox 0.15.0 missing requestMyLocationLatLng on ios

my first PR and first time work with Swift. let me know if something need to change

related #405

@felix-ht
Copy link
Collaborator

looks good but can you run swiftformat --swiftversion 4.2 --maxwidth 100 ios

@samderlust
Copy link
Contributor Author

@felix-ht I'll try that

@samderlust
Copy link
Contributor Author

@felix-ht I did the format

@erdnj
Copy link

erdnj commented Mar 12, 2022

Any progress on this issue?

@samderlust
Copy link
Contributor Author

@felix-ht I did the swiftformat --swiftversion 4.2 --maxwidth 100 ios but it's still failed for the swift formarting. any idea?

@felix-ht
Copy link
Collaborator

@felix-ht I did the swiftformat --swiftversion 4.2 --maxwidth 100 ios but it's still failed for the swift formarting. any idea?

the issue the lint complains about is:

/home/runner/work/maps/maps/ios/Classes/OfflinePackDownloadManager.swift:59:1: warning: (braces) Wrap braces in accordance with selected style (K&R or Allman).

can you run it again?

@samderlust
Copy link
Contributor Author

I did multiple time
here's the output

Running SwiftFormat...
SwiftFormat completed in 0.04s.
0/16 files formatted.

@felix-ht
Copy link
Collaborator

felix-ht commented Mar 15, 2022

what's your swift format version? we run 0.48.18

checked with your branch and i get:

ocell@Felixs-MBP ios % swiftformat --swiftversion 4.2 --maxwidth 100 .
Running SwiftFormat...
SwiftFormat completed in 0.11s.
1/16 files formatted.
ocell@Felixs-MBP ios % swiftformat --version
0.48.18

you can also just apply this git diff and commit it (or cherry pick this commit - 01c4326)

diff --git a/ios/Classes/OfflinePackDownloadManager.swift b/ios/Classes/OfflinePackDownloadManager.swift
index b9fa0d9..783ba58 100644
--- a/ios/Classes/OfflinePackDownloadManager.swift
+++ b/ios/Classes/OfflinePackDownloadManager.swift
@@ -56,8 +56,7 @@ class OfflinePackDownloader {
         let tilePyramidRegion = regionDefinition.toMGLTilePyramidOfflineRegion()
         storage
             .addPack(for: tilePyramidRegion,
-                     withContext: regionData.prepareContext())
-            { [weak self] pack, error in
+                     withContext: regionData.prepareContext()) { [weak self] pack, error in
                 if let pack = pack {
                     self?.onPackCreated(pack: pack)
                 } else {

@felix-ht felix-ht merged commit 7075c3b into flutter-mapbox-gl:master Mar 15, 2022
@felix-ht
Copy link
Collaborator

@samderlust btw the issue with the formatting was that your branch was month behind master

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