diff --git a/Cargo.lock b/Cargo.lock index 66b07b1c6..75d878f5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2759,7 +2759,7 @@ dependencies = [ [[package]] name = "sargon" -version = "1.1.54" +version = "1.1.55" dependencies = [ "actix-rt", "aes-gcm", @@ -2814,7 +2814,7 @@ dependencies = [ [[package]] name = "sargon-uniffi" -version = "1.1.54" +version = "1.1.55" dependencies = [ "actix-rt", "assert-json-diff", diff --git a/apple/Sources/Sargon/Protocols/EntityProtocol.swift b/apple/Sources/Sargon/Protocols/EntityProtocol.swift index feef7ad51..40b8a9333 100644 --- a/apple/Sources/Sargon/Protocols/EntityProtocol.swift +++ b/apple/Sources/Sargon/Protocols/EntityProtocol.swift @@ -32,6 +32,10 @@ extension EntityBaseProtocol { public var id: ID { address } public var networkID: NetworkID { networkId } + public var isDeleted: Bool { + flags.contains(.tombstonedByUser) + } + public var isHidden: Bool { flags.contains(.hiddenByUser) } diff --git a/apple/Tests/Utils/EntityProtocolTest.swift b/apple/Tests/Utils/EntityProtocolTest.swift index f3266d963..393b2a402 100644 --- a/apple/Tests/Utils/EntityProtocolTest.swift +++ b/apple/Tests/Utils/EntityProtocolTest.swift @@ -39,6 +39,10 @@ class EntityBaseTest: Test { func test_is_hidden() { XCTAssertFalse(SUT.sample.isHidden) } + + func test_is_deleted() { + XCTAssertFalse(SUT.sample.isDeleted) + } func test_hasAuthenticationSigningKey() { eachSample { sut in diff --git a/crates/sargon-uniffi/Cargo.toml b/crates/sargon-uniffi/Cargo.toml index 39a1f75af..39e26826c 100644 --- a/crates/sargon-uniffi/Cargo.toml +++ b/crates/sargon-uniffi/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sargon-uniffi" # Don't forget to update version in crates/sargon/Cargo.toml -version = "1.1.54" +version = "1.1.55" edition = "2021" build = "build.rs" diff --git a/crates/sargon/Cargo.toml b/crates/sargon/Cargo.toml index 1bd4fb341..d6d802cea 100644 --- a/crates/sargon/Cargo.toml +++ b/crates/sargon/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sargon" # Don't forget to update version in crates/sargon-uniffi/Cargo.toml -version = "1.1.54" +version = "1.1.55" edition = "2021" build = "build.rs"