Skip to content

Commit

Permalink
Remove CachedAnimatedImageView and related types (#23925)
Browse files Browse the repository at this point in the history
  • Loading branch information
kean authored Dec 24, 2024
2 parents d206058 + fbbfcb9 commit e07e9b0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 420 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit

extension CircularProgressView: ActivityIndicatorType {
extension CircularProgressView {
func startAnimating() {
isHidden = false
state = .indeterminate
Expand Down
80 changes: 0 additions & 80 deletions WordPress/Classes/Utility/Media/GIFPlaybackStrategy.swift

This file was deleted.

10 changes: 2 additions & 8 deletions WordPress/Classes/ViewRelated/Cells/MediaItemHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import WordPressShared
import WordPressMedia

final class MediaItemHeaderView: UIView {
let imageView = CachedAnimatedImageView()
let imageView = AsyncImageView()
private let errorView = UIImageView()
private let videoIconView = PlayIconView()
private let loadingIndicator = UIActivityIndicatorView(style: .large)
Expand Down Expand Up @@ -103,13 +103,7 @@ final class MediaItemHeaderView: UIView {
Task {
let image = try? await MediaImageService.shared.image(for: media, size: .large)
loadingIndicator.stopAnimating()

if let gif = image as? AnimatedImage, let data = gif.gifData {
imageView.animate(withGIFData: data)
} else {
imageView.image = image
}

imageView.image = image
errorView.isHidden = image != nil
}

Expand Down
285 changes: 0 additions & 285 deletions WordPress/Classes/ViewRelated/Media/CachedAnimatedImageView.swift

This file was deleted.

Loading

0 comments on commit e07e9b0

Please sign in to comment.