mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
allow copying blocked user id
This commit is contained in:
@@ -51,6 +51,12 @@ class BlockedUsersScreenViewModel: BlockedUsersScreenViewModelType, BlockedUsers
|
||||
self?.unblockUser(user)
|
||||
},
|
||||
secondaryButton: .init(title: L10n.actionCancel, role: .cancel, action: nil))
|
||||
case .copyUserID(let user):
|
||||
UIPasteboard.general.string = user.id
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.copiedIndicatorIdentifier,
|
||||
type: .toast,
|
||||
title: L10n.commonCopiedToClipboard,
|
||||
icon: \.check))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +114,7 @@ class BlockedUsersScreenViewModel: BlockedUsersScreenViewModelType, BlockedUsers
|
||||
// MARK: Loading indicator
|
||||
|
||||
private static let loadingIndicatorIdentifier = "\(BlockedUsersScreenViewModel.self)-Loading"
|
||||
private static let copiedIndicatorIdentifier = "\(BlockedUsersScreenViewModel.self)-Copied"
|
||||
|
||||
private func showLoadingIndicator() {
|
||||
userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier,
|
||||
|
||||
Reference in New Issue
Block a user