IOS-1521 less stress for UI IOS-1521
authorbuff <andreas@pep-project.org>
Tue, 07 May 2019 12:10:19 +0200
branchIOS-1521
changeset 85070f779065eb5d
parent 8506 1f8bb1396d0c
child 8508 0be70acaec88
IOS-1521 less stress for UI
pEpForiOS/UI/EmailDisplayList/EmailListViewCell.swift
     1.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewCell.swift	Tue May 07 10:12:49 2019 +0200
     1.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewCell.swift	Tue May 07 12:10:19 2019 +0200
     1.3 @@ -84,7 +84,9 @@
     1.4          }
     1.5  
     1.6          viewModel.getSecurityBadge { [weak self] image in
     1.7 -            self?.setPepRatingImage(image: image)
     1.8 +            DispatchQueue.main.async {
     1.9 +                self?.setPepRatingImage(image: image)
    1.10 +            }
    1.11          }
    1.12      }
    1.13  
    1.14 @@ -176,8 +178,10 @@
    1.15  //    }
    1.16  
    1.17      private func setPepRatingImage(image: UIImage?) {
    1.18 -        self.ratingImage.image = image
    1.19 -        self.ratingImage.isHidden = (image == nil)
    1.20 +        if ratingImage.image != image {
    1.21 +            self.ratingImage.image = image
    1.22 +            self.ratingImage.isHidden = (image == nil)
    1.23 +        }
    1.24      }
    1.25  
    1.26      private func setContactImage(image: UIImage?) {