Skip to content

Commit

Permalink
Update unread count when following #389
Browse files Browse the repository at this point in the history
  • Loading branch information
livid committed Nov 14, 2024
1 parent a93f43f commit 82a51a9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/swift-server/async-http-client.git",
"state" : {
"revision" : "64abc77edf1ef81e69bd90a2ac386de615c8e8ea",
"version" : "1.23.0"
"revision" : "0a9b72369b9d87ab155ef585ef50700a34abf070",
"version" : "1.23.1"
}
},
{
Expand All @@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/attaswift/BigInt.git",
"state" : {
"revision" : "793a7fac0bfc318e85994bf6900652e827aef33e",
"version" : "5.4.1"
"revision" : "a7ee11486233ba45f5ceee0b8cb3d6629ed450ef",
"version" : "5.5.0"
}
},
{
Expand All @@ -42,8 +42,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/vapor/console-kit.git",
"state" : {
"revision" : "78c0dd739df8cb9ee14a8bbbf770facc4fc3402a",
"version" : "4.15.0"
"revision" : "966d89ae64cd71c652a1e981bc971de59d64f13d",
"version" : "4.15.1"
}
},
{
Expand Down Expand Up @@ -208,6 +208,15 @@
"version" : "1.2.0"
}
},
{
"identity" : "swift-asn1",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-asn1.git",
"state" : {
"revision" : "7faebca1ea4f9aaf0cda1cef7c43aecd2311ddf6",
"version" : "1.3.0"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
Expand All @@ -231,8 +240,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-crypto.git",
"state" : {
"revision" : "ffca28be3c9c6a86a579949d23f68818a4b9b5d8",
"version" : "3.8.0"
"revision" : "06dc63c6d8da54ee11ceb268cde1fa68161afc96",
"version" : "3.9.1"
}
},
{
Expand All @@ -249,8 +258,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-http-types",
"state" : {
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd",
"version" : "1.3.0"
"revision" : "ef18d829e8b92d731ad27bb81583edd2094d1ce3",
"version" : "1.3.1"
}
},
{
Expand All @@ -276,17 +285,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "665206000b8307cab5ac51203d29b0f232d7e31b",
"version" : "2.74.0"
"revision" : "914081701062b11e3bb9e21accc379822621995e",
"version" : "2.76.1"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "d1ead62745cc3269e482f1c51f27608057174379",
"version" : "1.24.0"
"revision" : "2e9746cfc57554f70b650b021b6ae4738abef3e6",
"version" : "1.24.1"
}
},
{
Expand All @@ -303,17 +312,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"state" : {
"revision" : "7b84abbdcef69cc3be6573ac12440220789dcd69",
"version" : "2.27.2"
"revision" : "c7e95421334b1068490b5d41314a50e70bab23d1",
"version" : "2.29.0"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "dbace16f126fdcd80d58dc54526c561ca17327d7",
"version" : "1.22.0"
"revision" : "bbd5e63cf949b7db0c9edaf7a21e141c52afe214",
"version" : "1.23.0"
}
},
{
Expand All @@ -339,8 +348,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
"revision" : "c8a44d836fe7913603e246acab7c528c2e780168",
"version" : "1.4.0"
}
},
{
Expand All @@ -366,8 +375,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/scinfu/SwiftSoup.git",
"state" : {
"revision" : "3c2c7e1e72b8abd96eafbae80323c5c1e5317437",
"version" : "2.7.5"
"revision" : "0837db354faf9c9deb710dc597046edaadf5360f",
"version" : "2.7.6"
}
},
{
Expand All @@ -393,8 +402,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/vapor/vapor",
"state" : {
"revision" : "1466c50e4ad39072143e2fcdf13b4ba11be375a0",
"version" : "4.106.0"
"revision" : "9786a424db75c4e9eb53e255ce1268675b680562",
"version" : "4.106.3"
}
},
{
Expand Down
4 changes: 3 additions & 1 deletion Planet/Entities/PlanetStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ enum PlanetDetailViewType: Hashable, Equatable {
@Published var selectedView: PlanetDetailViewType? {
didSet {
if selectedView != oldValue {
selectedArticle = nil
Task { @MainActor in
self.selectedArticle = nil
}
refreshSelectedArticles()
UserDefaults.standard.set(selectedView?.stringValue, forKey: "lastSelectedView")

Expand Down
5 changes: 5 additions & 0 deletions Planet/Views/Sidebar/FollowingPlanetSidebarItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ struct FollowingPlanetSidebarItem: View {
planetStore.followingPlanets.removeAll { $0.id == planet.id }
planet.unpin()
planet.delete()
Task.detached {
await planetStore.updateTotalUnreadCount()
await planetStore.updateTotalStarredCount()
await planetStore.updateTotalTodayCount()
}
if case .followingPlanet(let selectedPlanet) = planetStore.selectedView,
planet == selectedPlanet
{
Expand Down
2 changes: 1 addition & 1 deletion Planet/marketing_version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 0.19.4;
MARKETING_VERSION = 0.20.0;
2 changes: 1 addition & 1 deletion Planet/versioning.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 2282
CURRENT_PROJECT_VERSION = 2287

0 comments on commit 82a51a9

Please sign in to comment.