Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] Update Example App #422

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
433 changes: 121 additions & 312 deletions README.md

Large diffs are not rendered by default.

32 changes: 14 additions & 18 deletions Sources/XMTPiOS/Conversation.swift
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
import Foundation
import LibXMTP

public enum Conversation {
public enum Conversation: Identifiable, Equatable, Hashable {
case group(Group)
case dm(Dm)

public static func == (lhs: Conversation, rhs: Conversation) -> Bool {
lhs.topic == rhs.topic
}

public func hash(into hasher: inout Hasher) {
hasher.combine(topic)
}

public enum ConversationType {
case group, dm
}

public var id: String {
get throws {
switch self {
case let .group(group):
return group.id
case let .dm(dm):
return dm.id
}
switch self {
case let .group(group):
return group.id
case let .dm(dm):
return dm.id
}
}

Expand Down Expand Up @@ -189,13 +195,3 @@ public enum Conversation {
}
}
}

extension Conversation: Hashable, Equatable {
public static func == (lhs: Conversation, rhs: Conversation) -> Bool {
lhs.topic == rhs.topic
}

public func hash(into hasher: inout Hasher) {
hasher.combine(topic)
}
}
13 changes: 0 additions & 13 deletions XMTPiOSExample/NotificationService/Info.plist

This file was deleted.

This file was deleted.

67 changes: 0 additions & 67 deletions XMTPiOSExample/NotificationService/NotificationService.swift

This file was deleted.

Loading
Loading