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

End of Year: Enable feature #598

Merged
merged 4 commits into from
Nov 21, 2022
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
-----

* New Features:
* Support Android 13 per-app language preferences
* Add End of Year stats
([#410](https://github.com/Automattic/pocket-casts-android/issues/410)).
* Support Android 13 per-app language preferences
([#519](https://github.com/Automattic/pocket-casts-android/pull/519)).
* Bug Fixes:
* Fixed some layout issues in the EpisodeFragment
Expand Down
1 change: 0 additions & 1 deletion base.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ android {
buildConfigField "String", "SHARING_SERVER_SECRET", "\"${project.sharingServerSecret}\""

// Feature Flags
buildConfigField "boolean", "END_OF_YEAR_ENABLED", "false"
buildConfigField "boolean", "END_OF_YEAR_REQUIRE_LOGIN", "true"
buildConfigField "boolean", "ONBOARDING_ENABLED", "false"
buildConfigField "boolean", "SINGLE_SIGN_ON_ENABLED", "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ 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 @@ -51,8 +50,7 @@ class EndOfYearManagerImpl @Inject constructor(
get() = Dispatchers.Default

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

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