mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Use Compound icons within the user indicators.
This commit is contained in:
@@ -160,7 +160,7 @@ class OAuthAuthenticationPresenter: NSObject {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: failureIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,6 @@ final class BugReportScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func showError(label: String) {
|
||||
parameters.userIndicatorController?.submitIndicator(UserIndicator(title: label, iconName: "xmark"))
|
||||
parameters.userIndicatorController?.submitIndicator(UserIndicator(title: label, icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,6 @@ class DeclineAndBlockScreenViewModel: DeclineAndBlockScreenViewModelType, Declin
|
||||
}
|
||||
|
||||
private func showSuccess() {
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.commonSuccess, iconName: "checkmark"))
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.commonSuccess, icon: \.check))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,21 +213,21 @@ class TimelineMediaPreviewViewModel: TimelineMediaPreviewViewModelType {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: statusIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.commonFileDeleted,
|
||||
iconName: "checkmark"))
|
||||
icon: \.check))
|
||||
}
|
||||
|
||||
private func showSavedIndicator() {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: statusIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.commonFileSaved,
|
||||
iconName: "checkmark"))
|
||||
icon: \.check))
|
||||
}
|
||||
|
||||
private func showErrorIndicator() {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: statusIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
|
||||
private func showTimelineEndIndicator() {
|
||||
|
||||
@@ -453,7 +453,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: UUID().uuidString,
|
||||
type: .toast,
|
||||
title: L10n.commonCurrentUserLeftRoom,
|
||||
iconName: "checkmark"))
|
||||
icon: \.check))
|
||||
actionsSubject.send(.roomLeft(roomIdentifier: roomID))
|
||||
}
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ class LocationSharingScreenViewModel: LocationSharingScreenViewModelType, Locati
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.statusIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
|
||||
private func showLoader() {
|
||||
|
||||
@@ -140,7 +140,7 @@ class ManageRoomMemberSheetViewModel: ManageRoomMemberSheetViewModelType, Manage
|
||||
|
||||
private func showManageMemberFailure(title: String) {
|
||||
userIndicatorController.retractIndicatorWithId(title)
|
||||
userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonFailed, iconName: "xmark"))
|
||||
userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonFailed, icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class ReportRoomScreenViewModel: ReportRoomScreenViewModelType, ReportRoomScreen
|
||||
await leaveRoom(showLoading: false)
|
||||
} else {
|
||||
hideLoadingIndicator()
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.dialogRoomReported, iconName: "checkmark"))
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.dialogRoomReported, icon: \.check))
|
||||
actionsSubject.send(.dismiss(shouldLeaveRoom: false))
|
||||
}
|
||||
case .failure:
|
||||
@@ -70,7 +70,7 @@ class ReportRoomScreenViewModel: ReportRoomScreenViewModelType, ReportRoomScreen
|
||||
|
||||
switch result {
|
||||
case .success:
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.dialogRoomReportedAndLeft, iconName: "checkmark"))
|
||||
userIndicatorController.submitIndicator(.init(title: L10n.dialogRoomReportedAndLeft, icon: \.check))
|
||||
actionsSubject.send(.dismiss(shouldLeaveRoom: true))
|
||||
case .failure:
|
||||
state.bindings.alert = .init(id: .leaveRoomFailed,
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ class ResolveVerifiedUserSendFailureScreenViewModel: ResolveVerifiedUserSendFail
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.failureIndicatorIdentifier,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ class RoomDirectorySearchScreenViewModel: RoomDirectorySearchScreenViewModelType
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.errorID,
|
||||
type: .toast,
|
||||
title: L10n.screenRoomDirectorySearchLoadingError,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
|
||||
// Add a small delay to allow the rooms to be published,
|
||||
|
||||
+1
-1
@@ -273,6 +273,6 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: statusIndicatorIdentifier,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ class RoomMembersListScreenViewModel: RoomMembersListScreenViewModelType, RoomMe
|
||||
|
||||
private func showManageMemberFailure(title: String) {
|
||||
userIndicatorController.retractIndicatorWithId(title)
|
||||
userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonFailed, iconName: "xmark"))
|
||||
userIndicatorController.submitIndicator(UserIndicator(title: L10n.commonFailed, icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -169,6 +169,6 @@ class RoomRolesAndPermissionsScreenViewModel: RoomRolesAndPermissionsScreenViewM
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.successIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.commonSuccess,
|
||||
iconName: "checkmark"))
|
||||
icon: \.check))
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ final class SecureBackupRecoveryKeyScreenCoordinator: CoordinatorProtocol {
|
||||
parameters.userIndicatorController.submitIndicator(.init(id: .init(),
|
||||
type: .toast(progress: nil),
|
||||
title: title,
|
||||
iconName: "checkmark",
|
||||
icon: \.check,
|
||||
persistent: false))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class LeaveSpaceViewModel: LeaveSpaceViewModelType {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.failureIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -187,6 +187,6 @@ class SpaceAddRoomsScreenViewModel: SpaceAddRoomsScreenViewModelType, SpaceAddRo
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: failureIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,6 +295,6 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.failureIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,6 @@ class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelPro
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.failureIndicatorID,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1106,7 +1106,7 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Constants.toastErrorID,
|
||||
type: .toast,
|
||||
title: title,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,6 @@ class UserProfileScreenViewModel: UserProfileScreenViewModelType, UserProfileScr
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: statusIndicatorIdentifier,
|
||||
type: .toast,
|
||||
title: L10n.errorUnknown,
|
||||
iconName: "xmark"))
|
||||
icon: \.close))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user