Skip to content

Commit 82a51a9

Browse files
committed
Update unread count when following #389
1 parent a93f43f commit 82a51a9

File tree

5 files changed

+43
-27
lines changed

5 files changed

+43
-27
lines changed

Diff for: Planet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+33-24
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"kind" : "remoteSourceControl",
77
"location" : "https://github.com/swift-server/async-http-client.git",
88
"state" : {
9-
"revision" : "64abc77edf1ef81e69bd90a2ac386de615c8e8ea",
10-
"version" : "1.23.0"
9+
"revision" : "0a9b72369b9d87ab155ef585ef50700a34abf070",
10+
"version" : "1.23.1"
1111
}
1212
},
1313
{
@@ -24,8 +24,8 @@
2424
"kind" : "remoteSourceControl",
2525
"location" : "https://github.com/attaswift/BigInt.git",
2626
"state" : {
27-
"revision" : "793a7fac0bfc318e85994bf6900652e827aef33e",
28-
"version" : "5.4.1"
27+
"revision" : "a7ee11486233ba45f5ceee0b8cb3d6629ed450ef",
28+
"version" : "5.5.0"
2929
}
3030
},
3131
{
@@ -42,8 +42,8 @@
4242
"kind" : "remoteSourceControl",
4343
"location" : "https://github.com/vapor/console-kit.git",
4444
"state" : {
45-
"revision" : "78c0dd739df8cb9ee14a8bbbf770facc4fc3402a",
46-
"version" : "4.15.0"
45+
"revision" : "966d89ae64cd71c652a1e981bc971de59d64f13d",
46+
"version" : "4.15.1"
4747
}
4848
},
4949
{
@@ -208,6 +208,15 @@
208208
"version" : "1.2.0"
209209
}
210210
},
211+
{
212+
"identity" : "swift-asn1",
213+
"kind" : "remoteSourceControl",
214+
"location" : "https://github.com/apple/swift-asn1.git",
215+
"state" : {
216+
"revision" : "7faebca1ea4f9aaf0cda1cef7c43aecd2311ddf6",
217+
"version" : "1.3.0"
218+
}
219+
},
211220
{
212221
"identity" : "swift-atomics",
213222
"kind" : "remoteSourceControl",
@@ -231,8 +240,8 @@
231240
"kind" : "remoteSourceControl",
232241
"location" : "https://github.com/apple/swift-crypto.git",
233242
"state" : {
234-
"revision" : "ffca28be3c9c6a86a579949d23f68818a4b9b5d8",
235-
"version" : "3.8.0"
243+
"revision" : "06dc63c6d8da54ee11ceb268cde1fa68161afc96",
244+
"version" : "3.9.1"
236245
}
237246
},
238247
{
@@ -249,8 +258,8 @@
249258
"kind" : "remoteSourceControl",
250259
"location" : "https://github.com/apple/swift-http-types",
251260
"state" : {
252-
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd",
253-
"version" : "1.3.0"
261+
"revision" : "ef18d829e8b92d731ad27bb81583edd2094d1ce3",
262+
"version" : "1.3.1"
254263
}
255264
},
256265
{
@@ -276,17 +285,17 @@
276285
"kind" : "remoteSourceControl",
277286
"location" : "https://github.com/apple/swift-nio.git",
278287
"state" : {
279-
"revision" : "665206000b8307cab5ac51203d29b0f232d7e31b",
280-
"version" : "2.74.0"
288+
"revision" : "914081701062b11e3bb9e21accc379822621995e",
289+
"version" : "2.76.1"
281290
}
282291
},
283292
{
284293
"identity" : "swift-nio-extras",
285294
"kind" : "remoteSourceControl",
286295
"location" : "https://github.com/apple/swift-nio-extras.git",
287296
"state" : {
288-
"revision" : "d1ead62745cc3269e482f1c51f27608057174379",
289-
"version" : "1.24.0"
297+
"revision" : "2e9746cfc57554f70b650b021b6ae4738abef3e6",
298+
"version" : "1.24.1"
290299
}
291300
},
292301
{
@@ -303,17 +312,17 @@
303312
"kind" : "remoteSourceControl",
304313
"location" : "https://github.com/apple/swift-nio-ssl.git",
305314
"state" : {
306-
"revision" : "7b84abbdcef69cc3be6573ac12440220789dcd69",
307-
"version" : "2.27.2"
315+
"revision" : "c7e95421334b1068490b5d41314a50e70bab23d1",
316+
"version" : "2.29.0"
308317
}
309318
},
310319
{
311320
"identity" : "swift-nio-transport-services",
312321
"kind" : "remoteSourceControl",
313322
"location" : "https://github.com/apple/swift-nio-transport-services.git",
314323
"state" : {
315-
"revision" : "dbace16f126fdcd80d58dc54526c561ca17327d7",
316-
"version" : "1.22.0"
324+
"revision" : "bbd5e63cf949b7db0c9edaf7a21e141c52afe214",
325+
"version" : "1.23.0"
317326
}
318327
},
319328
{
@@ -339,8 +348,8 @@
339348
"kind" : "remoteSourceControl",
340349
"location" : "https://github.com/apple/swift-system.git",
341350
"state" : {
342-
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
343-
"version" : "1.3.2"
351+
"revision" : "c8a44d836fe7913603e246acab7c528c2e780168",
352+
"version" : "1.4.0"
344353
}
345354
},
346355
{
@@ -366,8 +375,8 @@
366375
"kind" : "remoteSourceControl",
367376
"location" : "https://github.com/scinfu/SwiftSoup.git",
368377
"state" : {
369-
"revision" : "3c2c7e1e72b8abd96eafbae80323c5c1e5317437",
370-
"version" : "2.7.5"
378+
"revision" : "0837db354faf9c9deb710dc597046edaadf5360f",
379+
"version" : "2.7.6"
371380
}
372381
},
373382
{
@@ -393,8 +402,8 @@
393402
"kind" : "remoteSourceControl",
394403
"location" : "https://github.com/vapor/vapor",
395404
"state" : {
396-
"revision" : "1466c50e4ad39072143e2fcdf13b4ba11be375a0",
397-
"version" : "4.106.0"
405+
"revision" : "9786a424db75c4e9eb53e255ce1268675b680562",
406+
"version" : "4.106.3"
398407
}
399408
},
400409
{

Diff for: Planet/Entities/PlanetStore.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ enum PlanetDetailViewType: Hashable, Equatable {
7070
@Published var selectedView: PlanetDetailViewType? {
7171
didSet {
7272
if selectedView != oldValue {
73-
selectedArticle = nil
73+
Task { @MainActor in
74+
self.selectedArticle = nil
75+
}
7476
refreshSelectedArticles()
7577
UserDefaults.standard.set(selectedView?.stringValue, forKey: "lastSelectedView")
7678

Diff for: Planet/Views/Sidebar/FollowingPlanetSidebarItem.swift

+5
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ struct FollowingPlanetSidebarItem: View {
125125
planetStore.followingPlanets.removeAll { $0.id == planet.id }
126126
planet.unpin()
127127
planet.delete()
128+
Task.detached {
129+
await planetStore.updateTotalUnreadCount()
130+
await planetStore.updateTotalStarredCount()
131+
await planetStore.updateTotalTodayCount()
132+
}
128133
if case .followingPlanet(let selectedPlanet) = planetStore.selectedView,
129134
planet == selectedPlanet
130135
{

Diff for: Planet/marketing_version.xcconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MARKETING_VERSION = 0.19.4;
1+
MARKETING_VERSION = 0.20.0;

Diff for: Planet/versioning.xcconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CURRENT_PROJECT_VERSION = 2282
1+
CURRENT_PROJECT_VERSION = 2287

0 commit comments

Comments
 (0)