Skip to content

Commit

Permalink
Fix an issue with removeAll removing all sessions including current
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Apr 30, 2023
1 parent 6564c70 commit 60cf2b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Pulse 3.x

## Pulse 3.7.1

*Apr 30, 2023*

- Fix an issue with `LoggerStore/removeAll` removing current session

## Pulse 3.7.0

*Apr 29, 2023*

- Improve search suggestions on macOS that are now [displayed inline](https://user-images.githubusercontent.com/1567433/235319231-caaabe2f-d173-4dca-b585-203c36ee70cc.png) and support the same search options as on iOS
- Improve how search results are displayed on macOS
- Improve search scope picker and allow searching for in more scopes
Expand All @@ -21,6 +29,8 @@

## Pulse 3.6.0

*Apr 22, 2023*

### PulseUI

- Add new ["Sessions" screen](https://user-images.githubusercontent.com/1567433/233789699-08700704-0414-4a54-80af-c4c489d8c1d9.png)) where you can see all the previously recorded runs of the app. Tap on a session to see it in the "Console". Tap "Edit" to select one or more sessions, and then share only the selected sessions, delete them, or open them in the "Console".
Expand Down
4 changes: 2 additions & 2 deletions Pulse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.7.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos appletvsimulator appletvos";
Expand Down Expand Up @@ -2528,7 +2528,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 3.7.0;
MARKETING_VERSION = 3.7.1;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos appletvsimulator appletvos";
SUPPORTS_MACCATALYST = YES;
Expand Down
5 changes: 3 additions & 2 deletions Sources/Pulse/LoggerStore/LoggerStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ public final class LoggerStore: @unchecked Sendable {

if options.contains(.create) && !options.contains(.readonly) && configuration.isAutoStartingSession {
perform { _ in
let appInfo = Info.AppInfo.make()
self.saveEntity(for: self.session, info: appInfo)
self.saveEntity(for: self.session, info: .make())
}
} else {
viewContext.performAndWait {
Expand Down Expand Up @@ -750,6 +749,8 @@ extension LoggerStore {
try? deleteEntities(for: LoggerMessageEntity.fetchRequest())
try? deleteEntities(for: LoggerBlobHandleEntity.fetchRequest())
try? deleteEntities(for: LoggerSessionEntity.fetchRequest())
saveEntity(for: session, info: .make())

try? Files.removeItem(at: blobsURL)
Files.createDirectoryIfNeeded(at: blobsURL)
case .archive:
Expand Down

0 comments on commit 60cf2b2

Please sign in to comment.