Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable 2022 EoY #672

Merged
merged 3 commits into from
Jan 4, 2023
Merged
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 @@ -10,6 +10,8 @@
([#645](https://github.com/Automattic/pocket-casts-android/pull/645)).
* Display gravatar on profile screen
([#644](https://github.com/Automattic/pocket-casts-android/pull/644)).
* Remove 2022 End of Year stats flow
([#672](https://github.com/Automattic/pocket-casts-android/pull/672)).
* Bug Fixes:
* Fixed podcast date format
([#477](https://github.com/Automattic/pocket-casts-android/pull/477)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ class MainActivity :
}

override fun showStoriesOrAccount(source: String) {
if (viewModel.isSignedIn || !settings.endOfYearRequireLogin()) {
if (viewModel.isSignedIn) {
showStories(StoriesSource.fromString(source))
} else {
viewModel.waitingForSignInToShowStories = true
Expand Down
2 changes: 1 addition & 1 deletion base.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
buildConfigField "String", "GOOGLE_SIGN_IN_SERVER_CLIENT_ID", "\"${project.googleSignInServerClientId}\""

// Feature Flags
buildConfigField "boolean", "END_OF_YEAR_REQUIRE_LOGIN", "true"
buildConfigField "boolean", "END_OF_YEAR_ENABLED", "false"
buildConfigField "boolean", "SINGLE_SIGN_ON_ENABLED", "false"

testInstrumentationRunner project.testInstrumentationRunner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ interface Settings {

fun setEndOfYearModalHasBeenShown(value: Boolean)
fun getEndOfYearModalHasBeenShown(): Boolean
fun endOfYearRequireLogin(): Boolean

fun hasCompletedOnboarding(): Boolean
fun setHasCompletedOnboarding()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1488,10 +1488,6 @@ class SettingsImpl @Inject constructor(
override fun getEndOfYearModalHasBeenShown(): Boolean =
getBoolean(END_OF_YEAR_MODAL_HAS_BEEN_SHOWN_KEY, false)

override fun endOfYearRequireLogin(): Boolean {
return BuildConfig.END_OF_YEAR_REQUIRE_LOGIN
}

override fun hasCompletedOnboarding() = getBoolean(COMPLETED_ONBOARDING_KEY, false)

override fun setHasCompletedOnboarding() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import au.com.shiftyjelly.pocketcasts.models.db.helper.ListenedNumbers
import au.com.shiftyjelly.pocketcasts.models.db.helper.LongestEpisode
import au.com.shiftyjelly.pocketcasts.models.db.helper.TopPodcast
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.repositories.BuildConfig
import au.com.shiftyjelly.pocketcasts.repositories.endofyear.stories.Story
import au.com.shiftyjelly.pocketcasts.repositories.endofyear.stories.StoryEpilogue
import au.com.shiftyjelly.pocketcasts.repositories.endofyear.stories.StoryIntro
Expand Down Expand Up @@ -50,7 +51,8 @@ class EndOfYearManagerImpl @Inject constructor(
get() = Dispatchers.Default

override suspend fun isEligibleForStories(): Boolean =
hasEpisodesPlayedUpto(YEAR, TimeUnit.MINUTES.toSeconds(EPISODE_MINIMUM_PLAYED_TIME_IN_MIN))
hasEpisodesPlayedUpto(YEAR, TimeUnit.MINUTES.toSeconds(EPISODE_MINIMUM_PLAYED_TIME_IN_MIN)) &&
BuildConfig.END_OF_YEAR_ENABLED

/**
* Download the year's listening history.
Expand Down