Skip to content

Commit

Permalink
[MOB-9233] Updated code according to the new discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 7, 2025
1 parent fc1f6b5 commit 1ed58c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion swift-sdk/Internal/in-app/InAppManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
callback: ITBURLCallback? = nil) {
ITBInfo()

if message.content is IterableJsonInAppContent {
if message.isJsonOnly {
// JSON Only messages do not need to be shown
updateMessage(message, didProcessTrigger: true, consumed: consume)
if consume {
Expand Down
8 changes: 4 additions & 4 deletions swift-sdk/Internal/in-app/InAppPersistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ extension IterableInAppMessage: Codable {
case type
}

private var isJsonOnly: Bool {
return jsonOnly
}

public convenience init(from decoder: Decoder) {
guard let container = try? decoder.container(keyedBy: CodingKeys.self) else {
ITBError("Can not decode, returning default")
Expand Down Expand Up @@ -301,6 +297,10 @@ extension IterableInAppMessage: Codable {
self.consumed = consumed
}

var isJsonOnly: Bool {
return jsonOnly
}

public func encode(to encoder: Encoder) {
var container = encoder.container(keyedBy: CodingKeys.self)

Expand Down

0 comments on commit 1ed58c2

Please sign in to comment.