Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

enhancement/remove-survey #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]

- Thank you for everyone who recently completed our survey.

## [2.33.0] - 2021-05-19Z

- We are working on getting better at recommending who you should follow!
Expand Down
6 changes: 1 addition & 5 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return
}

if nav.presentNotificiationPrompt() {
return
}

_ = nav.presentSurveyPrompt()
_ = nav.presentNotificiationPrompt()
}
}

Expand Down
4 changes: 0 additions & 4 deletions Sources/NavigationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ class NavigationViewController: UINavigationController {
return UserPrompts.promptForNotifications(onView: self)
}

func presentSurveyPrompt() -> Bool {
return UserPrompts.promptForPMFSurvey(onView: self)
}

private func showClosedError() {
let banner = NotificationBanner(
title: NSLocalizedString("room_was_closed", comment: ""),
Expand Down
101 changes: 0 additions & 101 deletions Sources/Scenes/PMFSurveyPrompt/PMFSurveyPromptViewController.swift

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/UserDefaultsKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,4 @@ class UserDefaultsKeys {
class var lastNotificationsStartupPrompted: String {
return "lastNotificationsStartupPrompted"
}

class var hasAskedForPMFSurvey: String {
return "hasAskedForPMFSurvey"
}
}
15 changes: 0 additions & 15 deletions Sources/UserPrompts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,4 @@ class UserPrompts {

return true
}

static func promptForPMFSurvey(onView view: UIViewController) -> Bool {
if UserDefaults.standard.bool(forKey: UserDefaultsKeys.hasAskedForPMFSurvey) {
return false
}

if UserDefaults.standard.integer(forKey: UserDefaultsKeys.userId) == 19 {
return false
}

view.present(PMFSurveyPromptViewController(), animated: true)
UserDefaults.standard.set(true, forKey: UserDefaultsKeys.hasAskedForPMFSurvey)

return true
}
}