6.2.1 commit
This commit is contained in:
parent
ccb4b15153
commit
13870cedd2
|
@ -34,8 +34,8 @@ android {
|
|||
testApplicationId "ac.mdiq.podcini.tests"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
versionCode 3020221
|
||||
versionName "6.2.0"
|
||||
versionCode 3020222
|
||||
versionName "6.2.1"
|
||||
|
||||
applicationId "ac.mdiq.podcini.R"
|
||||
def commit = ""
|
||||
|
|
|
@ -3,12 +3,12 @@ package ac.mdiq.podcini.ui.fragment
|
|||
import ac.mdiq.podcini.R
|
||||
import ac.mdiq.podcini.databinding.BaseEpisodesListFragmentBinding
|
||||
import ac.mdiq.podcini.databinding.MultiSelectSpeedDialBinding
|
||||
import ac.mdiq.podcini.net.feed.FeedUpdateManager
|
||||
import ac.mdiq.podcini.playback.base.InTheatre.isCurMedia
|
||||
import ac.mdiq.podcini.storage.database.RealmDB.unmanaged
|
||||
import ac.mdiq.podcini.storage.model.Episode
|
||||
import ac.mdiq.podcini.storage.model.EpisodeMedia
|
||||
import ac.mdiq.podcini.storage.model.EpisodeFilter
|
||||
import ac.mdiq.podcini.storage.model.EpisodeMedia
|
||||
import ac.mdiq.podcini.storage.utils.EpisodeUtil
|
||||
import ac.mdiq.podcini.ui.actions.EpisodeMultiSelectHandler
|
||||
import ac.mdiq.podcini.ui.actions.menuhandler.EpisodeMenuHandler
|
||||
import ac.mdiq.podcini.ui.actions.menuhandler.MenuItemUtils
|
||||
|
@ -18,10 +18,8 @@ import ac.mdiq.podcini.ui.adapter.EpisodesAdapter
|
|||
import ac.mdiq.podcini.ui.adapter.SelectableAdapter
|
||||
import ac.mdiq.podcini.ui.dialog.ConfirmationDialog
|
||||
import ac.mdiq.podcini.ui.utils.EmptyViewHandler
|
||||
import ac.mdiq.podcini.ui.view.EpisodesRecyclerView
|
||||
import ac.mdiq.podcini.ui.utils.LiftOnScrollListener
|
||||
import ac.mdiq.podcini.storage.utils.EpisodeUtil
|
||||
import ac.mdiq.podcini.ui.fragment.SubscriptionsFragment.Companion
|
||||
import ac.mdiq.podcini.ui.view.EpisodesRecyclerView
|
||||
import ac.mdiq.podcini.util.Logd
|
||||
import ac.mdiq.podcini.util.event.EventFlow
|
||||
import ac.mdiq.podcini.util.event.FlowEvent
|
||||
|
@ -38,13 +36,15 @@ import androidx.lifecycle.lifecycleScope
|
|||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.leinardi.android.speeddial.SpeedDialActionItem
|
||||
import com.leinardi.android.speeddial.SpeedDialView
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
|
||||
@UnstableApi abstract class BaseEpisodesFragment : Fragment(), SelectableAdapter.OnSelectModeListener, Toolbar.OnMenuItemClickListener {
|
||||
|
@ -63,7 +63,7 @@ import kotlinx.coroutines.flow.collectLatest
|
|||
lateinit var emptyView: EmptyViewHandler
|
||||
lateinit var speedDialView: SpeedDialView
|
||||
lateinit var toolbar: MaterialToolbar
|
||||
lateinit var swipeRefreshLayout: SwipeRefreshLayout
|
||||
// lateinit var swipeRefreshLayout: SwipeRefreshLayout
|
||||
lateinit var swipeActions: SwipeActions
|
||||
private lateinit var progressBar: ProgressBar
|
||||
lateinit var adapter: EpisodesAdapter
|
||||
|
@ -108,8 +108,8 @@ import kotlinx.coroutines.flow.collectLatest
|
|||
val animator: RecyclerView.ItemAnimator? = recyclerView.itemAnimator
|
||||
if (animator is SimpleItemAnimator) animator.supportsChangeAnimations = false
|
||||
|
||||
swipeRefreshLayout = binding.swipeRefresh
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(resources.getInteger(R.integer.swipe_refresh_distance))
|
||||
// swipeRefreshLayout = binding.swipeRefresh
|
||||
// swipeRefreshLayout.setDistanceToTriggerSync(resources.getInteger(R.integer.swipe_refresh_distance))
|
||||
// swipeRefreshLayout.setOnRefreshListener { FeedUpdateManager.runOnceOrAsk(requireContext()) }
|
||||
|
||||
createListAdaptor()
|
||||
|
@ -417,7 +417,7 @@ import kotlinx.coroutines.flow.collectLatest
|
|||
Logd(TAG, "Received sticky event: ${event.TAG}")
|
||||
when (event) {
|
||||
is FlowEvent.EpisodeDownloadEvent -> onEpisodeDownloadEvent(event)
|
||||
is FlowEvent.FeedUpdatingEvent -> onFeedUpdateRunningEvent(event)
|
||||
// is FlowEvent.FeedUpdatingEvent -> onFeedUpdateRunningEvent(event)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
@ -476,9 +476,9 @@ import kotlinx.coroutines.flow.collectLatest
|
|||
|
||||
protected open fun updateToolbar() {}
|
||||
|
||||
private fun onFeedUpdateRunningEvent(event: FlowEvent.FeedUpdatingEvent) {
|
||||
swipeRefreshLayout.isRefreshing = event.isRunning
|
||||
}
|
||||
// private fun onFeedUpdateRunningEvent(event: FlowEvent.FeedUpdatingEvent) {
|
||||
// swipeRefreshLayout.isRefreshing = event.isRunning
|
||||
// }
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
outState.putBoolean(KEY_UP_ARROW, displayUpArrow)
|
||||
|
|
|
@ -30,11 +30,11 @@ import ac.mdiq.podcini.ui.actions.swipeactions.SwipeActions
|
|||
import ac.mdiq.podcini.ui.activity.MainActivity
|
||||
import ac.mdiq.podcini.ui.adapter.EpisodesAdapter
|
||||
import ac.mdiq.podcini.ui.adapter.SelectableAdapter
|
||||
import ac.mdiq.podcini.ui.compose.CustomTheme
|
||||
import ac.mdiq.podcini.ui.dialog.ConfirmationDialog
|
||||
import ac.mdiq.podcini.ui.dialog.EpisodeSortDialog
|
||||
import ac.mdiq.podcini.ui.utils.EmptyViewHandler
|
||||
import ac.mdiq.podcini.ui.utils.LiftOnScrollListener
|
||||
import ac.mdiq.podcini.ui.compose.CustomTheme
|
||||
import ac.mdiq.podcini.ui.view.EpisodesRecyclerView
|
||||
import ac.mdiq.podcini.ui.view.viewholder.EpisodeViewHolder
|
||||
import ac.mdiq.podcini.util.Logd
|
||||
|
@ -68,7 +68,6 @@ import androidx.media3.common.util.UnstableApi
|
|||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
@ -92,7 +91,7 @@ import java.util.*
|
|||
private lateinit var recyclerView: EpisodesRecyclerView
|
||||
private lateinit var emptyView: EmptyViewHandler
|
||||
private lateinit var toolbar: MaterialToolbar
|
||||
private lateinit var swipeRefreshLayout: SwipeRefreshLayout
|
||||
// private lateinit var swipeRefreshLayout: SwipeRefreshLayout
|
||||
private lateinit var swipeActions: SwipeActions
|
||||
private lateinit var speedDialView: SpeedDialView
|
||||
|
||||
|
@ -172,8 +171,8 @@ import java.util.*
|
|||
adapter?.setOnSelectModeListener(this)
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
swipeRefreshLayout = binding.swipeRefresh
|
||||
swipeRefreshLayout.setDistanceToTriggerSync(resources.getInteger(R.integer.swipe_refresh_distance))
|
||||
// swipeRefreshLayout = binding.swipeRefresh
|
||||
// swipeRefreshLayout.setDistanceToTriggerSync(resources.getInteger(R.integer.swipe_refresh_distance))
|
||||
// swipeRefreshLayout.setOnRefreshListener { FeedUpdateManager.runOnceOrAsk(requireContext()) }
|
||||
|
||||
emptyView = EmptyViewHandler(requireContext())
|
||||
|
@ -262,7 +261,7 @@ import java.util.*
|
|||
Logd(TAG, "Received sticky event: ${event.TAG}")
|
||||
when (event) {
|
||||
is FlowEvent.EpisodeDownloadEvent -> onEpisodeDownloadEvent(event)
|
||||
is FlowEvent.FeedUpdatingEvent -> swipeRefreshLayout.isRefreshing = event.isRunning
|
||||
// is FlowEvent.FeedUpdatingEvent -> swipeRefreshLayout.isRefreshing = event.isRunning
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
@ -392,10 +391,18 @@ import java.util.*
|
|||
val pos: Int = EpisodeUtil.indexOfItemWithDownloadUrl(queueItems.toList(), downloadUrl)
|
||||
if (pos >= 0) {
|
||||
val item = unmanaged(queueItems[pos])
|
||||
// item.media?.downloaded = true
|
||||
item.media?.setIsDownloaded()
|
||||
if (item.media != null) {
|
||||
val m = unmanaged(item.media!!)
|
||||
m.downloaded = true
|
||||
item.media = m
|
||||
queueItems[pos] = item
|
||||
adapter?.notifyItemChangedCompat(pos)
|
||||
}
|
||||
// val item = unmanaged(queueItems[pos])
|
||||
//// item.media?.downloaded = true
|
||||
// item.media?.setIsDownloaded()
|
||||
// adapter?.notifyItemChangedCompat(pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,19 +77,26 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/appbar">
|
||||
|
||||
<ac.mdiq.podcini.ui.view.EpisodesRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="@dimen/additional_horizontal_spacing" />
|
||||
android:paddingHorizontal="@dimen/additional_horizontal_spacing"
|
||||
android:layout_below="@id/appbar"/>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<!-- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout-->
|
||||
<!-- android:id="@+id/swipeRefresh"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_below="@id/appbar">-->
|
||||
|
||||
<!-- <ac.mdiq.podcini.ui.view.EpisodesRecyclerView-->
|
||||
<!-- android:id="@+id/recyclerView"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:paddingHorizontal="@dimen/additional_horizontal_spacing" />-->
|
||||
|
||||
<!-- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>-->
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
|
|
|
@ -75,19 +75,26 @@
|
|||
</LinearLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/appbar">
|
||||
|
||||
<ac.mdiq.podcini.ui.view.EpisodesRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="@dimen/additional_horizontal_spacing" />
|
||||
android:paddingHorizontal="@dimen/additional_horizontal_spacing"
|
||||
android:layout_below="@id/appbar"/>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<!-- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout-->
|
||||
<!-- android:id="@+id/swipeRefresh"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_below="@id/appbar">-->
|
||||
|
||||
<!-- <ac.mdiq.podcini.ui.view.EpisodesRecyclerView-->
|
||||
<!-- android:id="@+id/recyclerView"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:paddingHorizontal="@dimen/additional_horizontal_spacing" />-->
|
||||
|
||||
<!-- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>-->
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# 6.2.1
|
||||
|
||||
* likely fixed crash issue in Queue view during download
|
||||
* fully disabled down-swipe in Queue, AllEpisodes, History, and Downloads views
|
||||
|
||||
# 6.2.0
|
||||
|
||||
* first foot into Jetpack Compose, various views are in Compose
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
Version 6.2.1 brings several changes:
|
||||
|
||||
* likely fixed crash issue in Queue view during download
|
||||
* fully disabled down-swipe in Queue, AllEpisodes, History, and Downloads views
|
Loading…
Reference in New Issue