Skip to content

Commit

Permalink
Merge pull request #1345 from planetary-social/fix-home-feed-on-first…
Browse files Browse the repository at this point in the history
…-launch

Fix empty home feed on first launch
  • Loading branch information
mplorentz authored Jul 31, 2024
2 parents c939f48 + 1f39f7e commit 75f230f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Fixed a bug where the home feed would be empty on first launch.
- Fixed the issue where tapping outside the New Post view caused it to disappear and all its text to be lost.
- Remove stories UI to improve performance.
- Report error to Sentry when parse queue contains over 1000 events.
Expand Down
7 changes: 7 additions & 0 deletions Nos.xcodeproj/xcshareddata/xcschemes/Nos.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@
ReferencedContainer = "container:Nos.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "SWIFT_DETERMINISTIC_HASHING"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
1 change: 0 additions & 1 deletion Nos/Service/Relay/RelayService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ extension RelayService {
if let subID = responseArray[1] as? String,
let subscription = await subscriptionManager.subscription(from: subID),
subscription.closesAfterResponse {
Log.debug("\(socket.host) has finished responding on \(subID). Closing subscription.")
// This is a one-off request. Close it.
await sendClose(from: socket, subscriptionID: subID)
}
Expand Down
2 changes: 1 addition & 1 deletion Nos/Service/Relay/RelaySubscriptionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ actor RelaySubscriptionManagerActor: RelaySubscriptionManager {

var request = URLRequest(url: relayAddress)
request.timeoutInterval = 10
let socket = WebSocket(request: request)
let socket = WebSocket(request: request, useCustomEngine: false)
if let socketQueue {
socket.callbackQueue = socketQueue
} else {
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Home/HomeFeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct HomeFeedView: View {
/// true.
static let staticLoadTime: TimeInterval = 2

@ObservedObject var user: Author
let user: Author

@State private var showRelayPicker = false
@State private var selectedRelay: Relay?
Expand Down

0 comments on commit 75f230f

Please sign in to comment.