Leave Room (#699)

* created the row in the view and the alert, and added the new function to the RoomProxy

* fixed an issue with the alert function

* handling the navigation

* fixed a bug with the detail coordinators being dismissed incorrectly when inside a stack

* implementation completed

* replaced UI screenshots

* added a test for the fixed bug of the coordinators

* trying to increase the wait time for the expectation

* improved the test

* improved the buttons UI

* uploading artifacts for unit tests

* added result bundle true

* improved the tests

* added a new test

* pr suggestions

* updating mock

* PR suggestions

* improved tests

* fixed UI tests

* pr should be ready now

* removed testing code

* reduced complexity

* fixed test

* added a an assert to the new test case

* more tests and messages cases

* pr comments addressed

* completed
This commit is contained in:
Mauro
2023-03-17 14:57:08 +01:00
committed by GitHub
parent 7544619a55
commit 61d42a24ba
35 changed files with 719 additions and 155 deletions
@@ -31,9 +31,11 @@ enum RoomProxyError: Error {
case failedReportingContent
case failedAddingTimelineListener
case failedRetrievingMembers
case failedLeavingRoom
}
@MainActor
// sourcery: AutoMockable
protocol RoomProxyProtocol {
var id: String { get }
var isDirect: Bool { get }
@@ -51,9 +53,7 @@ protocol RoomProxyProtocol {
var topic: String? { get }
var avatarURL: URL? { get }
var permalink: URL? { get }
func loadAvatarURLForUserId(_ userId: String) async -> Result<URL?, RoomProxyError>
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError>
@@ -79,6 +79,8 @@ protocol RoomProxyProtocol {
func members() async -> Result<[RoomMemberProxy], RoomProxyError>
func retryDecryption(for sessionID: String) async
func leaveRoom() async -> Result<Void, RoomProxyError>
}
extension RoomProxyProtocol {