-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from WalletConnect/feature/chat-sample-homesc…
…reen-#293 [Chat] Showcase app UI #293
- Loading branch information
Showing
39 changed files
with
467 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Example/Showcase/Classes/PresentationLayer/Chat/Models/MessageViewModel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
Example/Showcase/Classes/PresentationLayer/ChatList/ChatListInteractor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
final class ChatListInteractor { | ||
|
||
private let chatService: ChatService | ||
|
||
init(chatService: ChatService) { | ||
self.chatService = chatService | ||
} | ||
|
||
func getThreads() -> Stream<[Thread]> { | ||
return chatService.getThreads() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Example/Showcase/Classes/PresentationLayer/ChatList/Models/ThreadViewModel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Foundation | ||
|
||
// TODO: Delete after Chat SDK integration | ||
struct Thread: Codable { | ||
let topic: String | ||
} | ||
|
||
struct ThreadViewModel: Identifiable { | ||
private let thread: Thread | ||
|
||
init(thread: Thread) { | ||
self.thread = thread | ||
} | ||
|
||
var topic: String { | ||
return thread.topic | ||
} | ||
|
||
var id: String { | ||
return thread.topic | ||
} | ||
|
||
var title: String { | ||
return thread.topic | ||
} | ||
|
||
var subtitle: String { | ||
return "Chicken, Peter, you’re just a little chicken. Cheep, cheep, cheep, cheep…" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Example/Showcase/Classes/PresentationLayer/Invite/InviteInteractor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
final class InviteInteractor { | ||
private let chatService: ChatService | ||
|
||
init(chatService: ChatService) { | ||
self.chatService = chatService | ||
} | ||
|
||
func invite(account: String) async { | ||
try! await chatService.invite(account: account) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.