Skip to content

Commit

Permalink
tryyyyyy
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed Sep 15, 2024
1 parent 22ff7cc commit e6007dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/MessagingInApp/State/InAppMessageMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func messageQueueProcessorMiddleware(logger: Logger) -> InAppMessageMiddleware {
let isCurrentMessageLoading = state.currentMessageState.isLoading
let isCurrentMessageDisplaying = state.currentMessageState.isDisplayed
// Dispatch next action to process remaining messages
next(.processMessageQueue(messages: notShownMessages))
// next(.processMessageQueue(messages: notShownMessages))

// If there is a message currently displayed or loading, do not show another message
guard let message = messageToBeShown,
Expand Down
3 changes: 1 addition & 2 deletions Tests/MessagingInApp/State/InAppMessageStateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ class InAppMessageStateTests: IntegrationTest {
func test_processMessageQueue_expectMessagesAddedToQueue() async throws {
let messages = [Message(queueId: "1"), Message(queueId: "2")]
await inAppMessageManager.dispatchAsync(action: .setUserIdentifier(user: .random))
try await dispatchAndWait(.processMessageQueue(messages: messages))
// await inAppMessageManager.dispatchAsync(action: .processMessageQueue(messages: messages))
await inAppMessageManager.dispatchAsync(action: .processMessageQueue(messages: messages))

let state = await inAppMessageManager.state
XCTAssertEqual(state.messagesInQueue.count, 2)
Expand Down

0 comments on commit e6007dd

Please sign in to comment.