Skip to content

Commit

Permalink
Merge pull request #100 from worthbak/wb/update-be-url
Browse files Browse the repository at this point in the history
Updates BE URL; fixes notification issue
  • Loading branch information
worthbak authored Dec 6, 2022
2 parents e707b0b + fb51314 commit c915540
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions InventoryWatch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.5;
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.worthbak.InventoryWatch;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -435,7 +435,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.5;
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.worthbak.InventoryWatch;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
3 changes: 1 addition & 2 deletions InventoryWatch/Model/Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ struct AnalyticsData: Codable, Equatable {
}

private static func postUserSettings(_ data: AnalyticsData) {
// let urlString = "http://127.0.0.1:3002/user-settings"
let urlString = "https://peaceful-island-18502.herokuapp.com/user-settings"
let urlString = "https://api.inventorywatch.app/user-settings"
guard let url = URL(string: urlString) else {
return
}
Expand Down
12 changes: 8 additions & 4 deletions InventoryWatch/Model/NotificationSender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ struct NotificationSender {
return "No Inventory Found"
}

let customSkuData = defaultsVendor.customSkuData
let filterForPreferredModels = defaultsVendor.notifyOnlyForPreferredModels

var collector: [PartAvailability: Int] = [:]
for (_, parts) in data {
for part in parts {
if filterForPreferredModels, !preferredModels.contains(part.partNumber) {
continue
}
let collect = { collector[part, default: 0] += 1 }

collector[part, default: 0] += 1
if part.partNumber == customSkuData?.sku {
collect()
} else if filterForPreferredModels, preferredModels.contains(part.partNumber) {
collect()
}
}
}

Expand Down
3 changes: 0 additions & 3 deletions InventoryWatch/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ struct SettingsView: View {
}

}
.onChange(of: preferredProductType) { _ in
Task { await model.fetchLatestInventory() }
}

Picker("Update every", selection: $preferredUpdateInterval) {
Text("Never").tag(0)
Expand Down
Binary file removed docs/InventoryWatch-0.2.0.zip
Binary file not shown.
Binary file added docs/InventoryWatch-0.2.1.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [Download InventoryWatch (0.2.0) Now ⤵️](./InventoryWatch-0.2.0.zip)
## [Download InventoryWatch (0.2.1) Now ⤵️](./InventoryWatch-0.2.1.zip)

![InventoryWatch-Screenshot](./ic-mkt.jpg)

Expand Down Expand Up @@ -68,4 +68,4 @@ macOS Big Sur 11.5 or newer. InventoryWatch is built with SwiftUI.

## Ready to go?

[Download InventoryWatch (0.2.0) Now ⤵️](./InventoryWatch-0.2.0.zip)
[Download InventoryWatch (0.2.1) Now ⤵️](./InventoryWatch-0.2.1.zip)

0 comments on commit c915540

Please sign in to comment.