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

Merge release 7.27-rc-3 to main #607

Merged
merged 3 commits into from
Nov 24, 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
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class StoriesViewModel @Inject constructor(
}

fun start() {
if (state.value !is State.Loaded) return

val currentState = state.value as State.Loaded
val progressFraction =
(PROGRESS_UPDATE_INTERVAL_MS / totalLengthInMs.toFloat())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
package au.com.shiftyjelly.pocketcasts.repositories.podcast

import au.com.shiftyjelly.pocketcasts.models.db.helper.UserEpisodePodcastSubstitute
import au.com.shiftyjelly.pocketcasts.models.entity.Episode
import au.com.shiftyjelly.pocketcasts.models.entity.Podcast
import au.com.shiftyjelly.pocketcasts.models.to.HistorySyncResponse
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.utils.extensions.parseIsoDate
import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.rx2.await
import kotlinx.coroutines.withContext
import java.util.Date
import timber.log.Timber
import javax.inject.Inject
import kotlin.coroutines.CoroutineContext

Expand Down Expand Up @@ -88,17 +86,8 @@ class HistoryManager @Inject constructor(
episode.lastPlaybackInteractionSyncStatus = Episode.LAST_PLAYBACK_INTERACTION_SYNCED
episodeManager.update(episode)
}
} else if (podcastUuid != null && podcastUuid != UserEpisodePodcastSubstitute.uuid) {
// add episodes which on longer exist in a podcast so they show up in listening history
val skeleton = Episode(
uuid = episodeUuid,
podcastUuid = podcastUuid,
title = change.title ?: "",
publishedDate = change.published?.parseIsoDate() ?: Date(),
downloadUrl = change.url,
lastPlaybackInteraction = interactionDate
)
skeletonEpisodes.add(skeleton)
} else if (podcastUuid != null) {
Timber.i("Listening history episode no longer exists. Episode: $episodeUuid podcast: $podcastUuid")
}
} else if (change.action == ACTION_DELETE) {
if (episode != null) {
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Version Information for Vanilla / Release builds
versionName=7.27-rc-2
versionCode=9051
versionName=7.27-rc-3
versionCode=9052