mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Device Verification: Verify screen: display emojis
This commit is contained in:
+28
-1
@@ -19,7 +19,7 @@
|
||||
import UIKit
|
||||
|
||||
final class DeviceVerificationVerifyViewController: UIViewController {
|
||||
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
private enum Constants {
|
||||
@@ -191,3 +191,30 @@ extension DeviceVerificationVerifyViewController: DeviceVerificationVerifyViewMo
|
||||
self.render(viewState: viewSate)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension DeviceVerificationVerifyViewController: UICollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
guard let emojis = self.viewModel.emojis else {
|
||||
return 0
|
||||
}
|
||||
return emojis.count
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
|
||||
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "VerifyEmojiCollectionViewCell", for: indexPath) as? VerifyEmojiCollectionViewCell else {
|
||||
return UICollectionViewCell()
|
||||
}
|
||||
|
||||
guard let emoji = self.viewModel.emojis?[indexPath.row] else {
|
||||
return UICollectionViewCell()
|
||||
}
|
||||
|
||||
cell.emoji.text = emoji.emoji
|
||||
cell.name.text = emoji.name
|
||||
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user