From 690a237b88df678ead0872c0904fa5f61c26fce6 Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Wed, 22 May 2024 15:56:57 +0200 Subject: [PATCH] mover permanent survey card to first position --- .../HomePage/Model/HomePageContinueSetUpModel.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo/HomePage/Model/HomePageContinueSetUpModel.swift b/DuckDuckGo/HomePage/Model/HomePageContinueSetUpModel.swift index 22ddf43e7e..df7ea99ccb 100644 --- a/DuckDuckGo/HomePage/Model/HomePageContinueSetUpModel.swift +++ b/DuckDuckGo/HomePage/Model/HomePageContinueSetUpModel.swift @@ -286,12 +286,10 @@ extension HomePage.Models { } var randomisedFeatures: [FeatureType] { - var features = FeatureType.allCases - features.shuffle() - for (index, feature) in features.enumerated() where feature == .defaultBrowser { - features.remove(at: index) - features.insert(feature, at: 0) - } + var features: [FeatureType] = [.permanentSurvey, .defaultBrowser] + var shuffledFeatures = FeatureType.allCases.filter { $0 != .defaultBrowser && $0 != .permanentSurvey } + shuffledFeatures.shuffle() + features.append(contentsOf: shuffledFeatures) return features }