Skip to content

Commit

Permalink
Update loading animation after login (don't display Element logo anym…
Browse files Browse the repository at this point in the history
…ore)
  • Loading branch information
NicolasBuquet committed Oct 7, 2024
1 parent a4451f3 commit 94b4202
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Riot/Modules/LaunchLoading/LaunchLoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,33 @@ final class LaunchLoadingView: UIView, NibLoadable, Themable {
animationTimeline.play()
self.animationTimeline = animationTimeline

// Tchap: setup custom loading view.
tchapSetupLoadingView()

progressContainer.isHidden = true
}

// Tchap: replace Element logo loadng animation by a simple UIActivityIndicatorView.
private func tchapSetupLoadingView() {
let tchapAnimationView = UIActivityIndicatorView(style: .large)
self.addSubview(tchapAnimationView)
tchapAnimationView.translatesAutoresizingMaskIntoConstraints = false
tchapAnimationView.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true
tchapAnimationView.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true
tchapAnimationView.startAnimating()

// Hide Element aninmated logo.
animationView.isHidden = true
}

// MARK: - Public

func update(theme: Theme) {
self.backgroundColor = theme.backgroundColor
self.animationView.backgroundColor = theme.backgroundColor

// Tchap: Set progress view to Tchap color.
progressView.progressTintColor = theme.tintColor
}
}

Expand Down

0 comments on commit 94b4202

Please sign in to comment.