Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
UI Main thread warnings and dutch (#311)
Browse files Browse the repository at this point in the history
* Solves #308 (missing dutch localisations) and #307 (warning crash main thread).

* #307 removed another main thread warning

* Delete OpenFoodFacts copy-Info.plist
  • Loading branch information
aleene authored and teolemon committed Jul 13, 2019
1 parent cb55dd1 commit 255321d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions OpenFoodFacts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
30E43D77220895B100D7A906 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = "<group>"; };
512702DF21F0B076002EC65C /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
512702E021F0B077002EC65C /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
51707DE722BE7D2D007FF823 /* OpenFoodFacts copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "OpenFoodFacts copy-Info.plist"; path = "/Users/arnaud/Programming/openfoodfacts-ios/OpenFoodFacts copy-Info.plist"; sourceTree = "<absolute>"; };
7437FBA42036F1F800D107B6 /* CreditsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditsViewController.swift; sourceTree = "<group>"; };
74C59E8A203FB9E2006C456F /* SharingManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharingManager.swift; sourceTree = "<group>"; };
74CB633820373B6C008FC48D /* Credits.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Credits.html; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1623,6 +1624,7 @@
951FA76E1F4E22790096AC5A /* UITests */,
95F1848B1F655BB500A544C2 /* TestResources */,
95C2650F1E96D55B004212EC /* Products */,
51707DE722BE7D2D007FF823 /* OpenFoodFacts copy-Info.plist */,
);
sourceTree = "<group>";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ class ScannerViewController: UIViewController, DataManagerClient {
}

fileprivate func resetOverlay() {
overlay.setText("product-scanner.overlay.user-help".localized)
showHelpInOverlayTask?.cancel()
showScanHelpInstructions()
DispatchQueue.main.async {
self.overlay.setText("product-scanner.overlay.user-help".localized)
self.showHelpInOverlayTask?.cancel()
self.showScanHelpInstructions()
}
}

fileprivate func showScanHelpInstructions() {
Expand Down Expand Up @@ -294,7 +296,9 @@ extension ScannerViewController: AVCaptureMetadataOutputObjectsDelegate {
if lastCodeScanned == nil || (lastCodeScanned != nil && lastCodeScanned != barcode) {
resetOverlay()
allergenAlertShown = false
floatingLabelContainer.isHidden = true
DispatchQueue.main.async {
self.floatingLabelContainer.isHidden = true
}
lastCodeScanned = barcode
getProduct(barcode: barcode, isSummary: true)
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"product-search.error-view.title" = "Er ging iets mis";
"product-search.error-view.subtitle" = "Probeer het opnieuw";
"product-search.initial-view.slogan" = "the free food products database";
"product-search.initial-view.offline.title-loading" = "Producten offline opslaan: %d%%";
"product-search.initial-view.offline.subtitle" = "Meer dan %d producten zijn scan-baar";

// Product Scanner
"product-scanner.overlay.user-help" = "Scan de barcode van het product";
Expand Down

0 comments on commit 255321d

Please sign in to comment.