From 94b420221834fb637487cd901360ae3e1c6915c8 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Wed, 2 Oct 2024 16:24:09 +0200 Subject: [PATCH] Update loading animation after login (don't display Element logo anymore) --- .../LaunchLoading/LaunchLoadingView.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Riot/Modules/LaunchLoading/LaunchLoadingView.swift b/Riot/Modules/LaunchLoading/LaunchLoadingView.swift index c4cdee422..fe880f573 100644 --- a/Riot/Modules/LaunchLoading/LaunchLoadingView.swift +++ b/Riot/Modules/LaunchLoading/LaunchLoadingView.swift @@ -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 } }