Skip to content

Commit

Permalink
Merge pull request #5081 from wikimedia/cleanup
Browse files Browse the repository at this point in the history
Remove unused props
  • Loading branch information
tonisevener authored Nov 19, 2024
2 parents 6f79593 + 2b52064 commit 6772850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class WMFYearInReviewViewModel: ObservableObject {
@Published var currentSlide = 0
public let localizedStrings: LocalizedStrings
var slides: [YearInReviewSlideContent]
let username: String?
public let shareLink: String
public let hashtag: String
let hasPersonalizedDonateSlide: Bool
Expand All @@ -28,11 +27,10 @@ public class WMFYearInReviewViewModel: ObservableObject {

@Published public var isLoading: Bool = false

public init(isFirstSlide: Bool = true, localizedStrings: LocalizedStrings, slides: [YearInReviewSlideContent], username: String?, shareLink: String, hashtag: String, hasPersonalizedDonateSlide: Bool, coordinatorDelegate: YearInReviewCoordinatorDelegate?, loggingDelegate: WMFYearInReviewLoggingDelegate, badgeDelegate: YearInReviewBadgeDelegate?) {
public init(isFirstSlide: Bool = true, localizedStrings: LocalizedStrings, slides: [YearInReviewSlideContent], shareLink: String, hashtag: String, hasPersonalizedDonateSlide: Bool, coordinatorDelegate: YearInReviewCoordinatorDelegate?, loggingDelegate: WMFYearInReviewLoggingDelegate, badgeDelegate: YearInReviewBadgeDelegate?) {
self.isFirstSlide = isFirstSlide
self.localizedStrings = localizedStrings
self.slides = slides
self.username = username
self.shareLink = shareLink
self.hasPersonalizedDonateSlide = hasPersonalizedDonateSlide
self.hashtag = hashtag
Expand Down Expand Up @@ -64,9 +62,8 @@ public class WMFYearInReviewViewModel: ObservableObject {
let firstSlideCTA: String
let firstSlideLearnMore: String
public let shareText: String
public let usernameTitle: String

public init(donateButtonTitle: String, doneButtonTitle: String, shareButtonTitle: String, nextButtonTitle: String, finishButtonTitle: String, firstSlideTitle: String, firstSlideSubtitle: String, firstSlideCTA: String, firstSlideLearnMore: String, shareText: String, usernameTitle: String) {
public init(donateButtonTitle: String, doneButtonTitle: String, shareButtonTitle: String, nextButtonTitle: String, finishButtonTitle: String, firstSlideTitle: String, firstSlideSubtitle: String, firstSlideCTA: String, firstSlideLearnMore: String, shareText: String) {
self.donateButtonTitle = donateButtonTitle
self.doneButtonTitle = doneButtonTitle
self.shareButtonTitle = shareButtonTitle
Expand All @@ -77,7 +74,6 @@ public class WMFYearInReviewViewModel: ObservableObject {
self.firstSlideCTA = firstSlideCTA
self.firstSlideLearnMore = firstSlideLearnMore
self.shareText = shareText
self.usernameTitle = usernameTitle
}

}
Expand Down
5 changes: 2 additions & 3 deletions Wikipedia/Code/YearInReviewCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,13 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
firstSlideSubtitle: WMFLocalizedString("year-in-review-subtitle", value: "See insights about which articles you read on the Wikipedia app and the edits you made. Your reading history is kept protected. Reading insights are calculated using locally stored data on your device.", comment: "Year in review page information"),
firstSlideCTA: CommonStrings.getStartedTitle,
firstSlideLearnMore: CommonStrings.learnMoreTitle(),
shareText: WMFLocalizedString("year-in-review-share-text", value: "Here's my Wikipedia Year In Review. Created with the Wikipedia iOS app", comment: "Text shared the Year In Review slides"),
usernameTitle: CommonStrings.userTitle
shareText: WMFLocalizedString("year-in-review-share-text", value: "Here's my Wikipedia Year In Review. Created with the Wikipedia iOS app", comment: "Text shared the Year In Review slides")
)

let appShareLink = WMFYearInReviewDataController.appShareLink
let hashtag = "#WikipediaYearInReview"

let viewModel = WMFYearInReviewViewModel(localizedStrings: localizedStrings, slides: slides, username: dataStore.authenticationManager.authStatePermanentUsername, shareLink: appShareLink, hashtag: hashtag, hasPersonalizedDonateSlide: hasPersonalizedDonateSlide, coordinatorDelegate: self, loggingDelegate: self, badgeDelegate: badgeDelegate)
let viewModel = WMFYearInReviewViewModel(localizedStrings: localizedStrings, slides: slides, shareLink: appShareLink, hashtag: hashtag, hasPersonalizedDonateSlide: hasPersonalizedDonateSlide, coordinatorDelegate: self, loggingDelegate: self, badgeDelegate: badgeDelegate)

let yirview = WMFYearInReviewView(viewModel: viewModel)

Expand Down

0 comments on commit 6772850

Please sign in to comment.