5.2.1 commit

This commit is contained in:
Xilin Jia 2024-05-16 11:15:13 +01:00
parent 6d22cf55b9
commit ef5fe709ba
9 changed files with 38 additions and 41 deletions

View File

@ -2,7 +2,7 @@ plugins {
id('com.android.application') id('com.android.application')
id 'kotlin-android' id 'kotlin-android'
id 'kotlin-kapt' id 'kotlin-kapt'
// id 'com.google.devtools.ksp' id 'com.google.devtools.ksp'
id('com.github.triplet.play') version '3.8.3' apply false id('com.github.triplet.play') version '3.8.3' apply false
} }
@ -159,8 +159,8 @@ android {
// Version code schema (not used): // Version code schema (not used):
// "1.2.3-beta4" -> 1020304 // "1.2.3-beta4" -> 1020304
// "1.2.3" -> 1020395 // "1.2.3" -> 1020395
versionCode 3020143 versionCode 3020144
versionName "5.2.0" versionName "5.2.1"
def commit = "" def commit = ""
try { try {
@ -213,7 +213,6 @@ android {
} }
} }
androidResources { androidResources {
additionalParameters "--no-version-vectors" additionalParameters "--no-version-vectors"
} }
@ -233,7 +232,8 @@ dependencies {
} }
} }
kapt "androidx.annotation:annotation:1.7.1" // doesn't work with ksp??
kapt "androidx.annotation:annotation:1.8.0"
implementation "androidx.appcompat:appcompat:1.6.1" implementation "androidx.appcompat:appcompat:1.6.1"
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'

View File

@ -61,11 +61,11 @@
license="Apache 2.0" license="Apache 2.0"
licenseText="LICENSE_APACHE-2.0.txt" /> licenseText="LICENSE_APACHE-2.0.txt" />
<library <library
name="Glide" name="Coil"
author="bumptech" author="Colin White et.al"
website="https://github.com/bumptech/glide" website="https://github.com/coil-kt/coil"
license="Simplified BSD" license="Apache 2.0"
licenseText="LICENSE_GLIDE.txt" /> licenseText="LICENSE_APACHE-2.0.txt" />
<library <library
name="Iconify" name="Iconify"
author="Joan Zapata" author="Joan Zapata"

View File

@ -47,7 +47,6 @@ import com.google.android.material.snackbar.Snackbar
import com.joanzapata.iconify.Iconify import com.joanzapata.iconify.Iconify
import com.leinardi.android.speeddial.SpeedDialActionItem import com.leinardi.android.speeddial.SpeedDialActionItem
import com.leinardi.android.speeddial.SpeedDialView import com.leinardi.android.speeddial.SpeedDialView
import io.reactivex.disposables.Disposable
import kotlinx.coroutines.* import kotlinx.coroutines.*
import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.StringUtils
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
@ -128,10 +127,8 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
val iconTintManager: ToolbarIconTintManager = object : ToolbarIconTintManager( val iconTintManager: ToolbarIconTintManager = object : ToolbarIconTintManager(
requireContext(), binding.toolbar, binding.collapsingToolbar) { requireContext(), binding.toolbar, binding.collapsingToolbar) {
override fun doTint(themedContext: Context) { override fun doTint(themedContext: Context) {
binding.toolbar.menu.findItem(R.id.refresh_item) binding.toolbar.menu.findItem(R.id.refresh_item).setIcon(AppCompatResources.getDrawable(themedContext, R.drawable.ic_refresh))
.setIcon(AppCompatResources.getDrawable(themedContext, R.drawable.ic_refresh)) binding.toolbar.menu.findItem(R.id.action_search).setIcon(AppCompatResources.getDrawable(themedContext, R.drawable.ic_search))
binding.toolbar.menu.findItem(R.id.action_search)
.setIcon(AppCompatResources.getDrawable(themedContext, R.drawable.ic_search))
} }
} }
iconTintManager.updateTint() iconTintManager.updateTint()
@ -357,13 +354,13 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN) @UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
fun favoritesChanged(event: FavoritesEvent?) { fun favoritesChanged(event: FavoritesEvent?) {
Logd(TAG, "favoritesChanged called") Logd(TAG, "favoritesChanged called")
updateUi() loadItems()
} }
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN) @UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
fun onQueueChanged(event: QueueEvent?) { fun onQueueChanged(event: QueueEvent?) {
Logd(TAG, "onQueueChanged called") Logd(TAG, "onQueueChanged called")
updateUi() loadItems()
} }
override fun onStartSelectMode() { override fun onStartSelectMode() {
@ -386,27 +383,23 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
swipeActions.attachTo(binding.recyclerView) swipeActions.attachTo(binding.recyclerView)
} }
@UnstableApi private fun updateUi() {
loadItems()
}
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN) @UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
fun onPlayerStatusChanged(event: PlayerStatusEvent?) { fun onPlayerStatusChanged(event: PlayerStatusEvent?) {
Logd(TAG, "onPlayerStatusChanged called") Logd(TAG, "onPlayerStatusChanged called")
updateUi() loadItems()
} }
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN) @UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
fun onUnreadItemsChanged(event: UnreadItemsUpdateEvent?) { fun onUnreadItemsChanged(event: UnreadItemsUpdateEvent?) {
Logd(TAG, "onUnreadItemsChanged called") Logd(TAG, "onUnreadItemsChanged called")
updateUi() loadItems()
} }
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN) @UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
fun onFeedListChanged(event: FeedListUpdateEvent) { fun onFeedListChanged(event: FeedListUpdateEvent) {
if (feed != null && event.contains(feed!!)) { if (feed != null && event.contains(feed!!)) {
Logd(TAG, "onFeedListChanged called") Logd(TAG, "onFeedListChanged called")
updateUi() loadItems()
} }
} }
@ -461,7 +454,6 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
@UnstableApi private fun setupHeaderView() { @UnstableApi private fun setupHeaderView() {
if (feed == null || headerCreated) return if (feed == null || headerCreated) return
// https://github.com/bumptech/glide/issues/529
binding.imgvBackground.colorFilter = LightingColorFilter(-0x99999a, 0x000000) binding.imgvBackground.colorFilter = LightingColorFilter(-0x99999a, 0x000000)
binding.header.imgvCover.setOnClickListener { showFeedInfo() } binding.header.imgvCover.setOnClickListener { showFeedInfo() }
binding.header.butShowSettings.setOnClickListener { binding.header.butShowSettings.setOnClickListener {
@ -572,7 +564,7 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
val feed_ = loadData() val feed_ = loadData()
if (feed_ != null) { if (feed_ != null) {
var hasNonMediaItems = false var hasNonMediaItems = false
for (item in feed_!!.items) { for (item in feed_.items) {
if (item.media == null) { if (item.media == null) {
hasNonMediaItems = true hasNonMediaItems = true
break break

View File

@ -134,8 +134,7 @@ class QueueFragment : Fragment(), Toolbar.OnMenuItemClickListener, SelectableAda
recyclerAdapter = object : QueueRecyclerAdapter(activity as MainActivity, swipeActions) { recyclerAdapter = object : QueueRecyclerAdapter(activity as MainActivity, swipeActions) {
override fun onCreateContextMenu(menu: ContextMenu, v: View, menuInfo: ContextMenu.ContextMenuInfo?) { override fun onCreateContextMenu(menu: ContextMenu, v: View, menuInfo: ContextMenu.ContextMenuInfo?) {
super.onCreateContextMenu(menu, v, menuInfo) super.onCreateContextMenu(menu, v, menuInfo)
MenuItemUtils.setOnClickListeners(menu MenuItemUtils.setOnClickListeners(menu) { item: MenuItem -> this@QueueFragment.onContextItemSelected(item) }
) { item: MenuItem -> this@QueueFragment.onContextItemSelected(item) }
} }
} }
recyclerAdapter?.setOnSelectModeListener(this) recyclerAdapter?.setOnSelectModeListener(this)
@ -163,7 +162,6 @@ class QueueFragment : Fragment(), Toolbar.OnMenuItemClickListener, SelectableAda
override fun onMainActionSelected(): Boolean { override fun onMainActionSelected(): Boolean {
return false return false
} }
override fun onToggleChanged(open: Boolean) { override fun onToggleChanged(open: Boolean) {
if (open && recyclerAdapter!!.selectedCount == 0) { if (open && recyclerAdapter!!.selectedCount == 0) {
(activity as MainActivity).showSnackbarAbovePlayer(R.string.no_items_selected, Snackbar.LENGTH_SHORT) (activity as MainActivity).showSnackbarAbovePlayer(R.string.no_items_selected, Snackbar.LENGTH_SHORT)
@ -193,11 +191,10 @@ class QueueFragment : Fragment(), Toolbar.OnMenuItemClickListener, SelectableAda
recyclerView.saveScrollPosition(TAG) recyclerView.saveScrollPosition(TAG)
} }
override fun onStop() { // override fun onStop() {
super.onStop() // super.onStop()
scope.cancel() //// disposable?.dispose()
// disposable?.dispose() // }
}
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(event: QueueEvent) { fun onEventMainThread(event: QueueEvent) {
@ -340,6 +337,7 @@ class QueueFragment : Fragment(), Toolbar.OnMenuItemClickListener, SelectableAda
recyclerAdapter?.endSelectMode() recyclerAdapter?.endSelectMode()
recyclerAdapter = null recyclerAdapter = null
EventBus.getDefault().unregister(this) EventBus.getDefault().unregister(this)
scope.cancel()
toolbar.setOnMenuItemClickListener(null) toolbar.setOnMenuItemClickListener(null)
toolbar.setOnLongClickListener(null) toolbar.setOnLongClickListener(null)
@ -518,7 +516,6 @@ class QueueFragment : Fragment(), Toolbar.OnMenuItemClickListener, SelectableAda
Log.e(TAG, Log.getStackTraceString(e)) Log.e(TAG, Log.getStackTraceString(e))
} }
} }
} }
override fun onStartSelectMode() { override fun onStartSelectMode() {

View File

@ -107,8 +107,8 @@ class EpisodeItemViewHolder(private val activity: MainActivity, parent: ViewGrou
container.alpha = if (item.isPlayed()) 0.75f else 1.0f container.alpha = if (item.isPlayed()) 0.75f else 1.0f
val newButton = ItemActionButton.forItem(item) val newButton = ItemActionButton.forItem(item)
// Log.d(TAG, "bind ${actionButton?.TAG} ${newButton.TAG} ${item.title}") Logd(TAG, "bind ${actionButton?.TAG} ${newButton.TAG} ${item.title}")
// not using a new button to ensure valid progress values // not using a new button to ensure valid progress values, for TTS audio generation
if (!(actionButton?.TAG == TTSActionButton::class.simpleName && newButton.TAG == TTSActionButton::class.simpleName)) { if (!(actionButton?.TAG == TTSActionButton::class.simpleName && newButton.TAG == TTSActionButton::class.simpleName)) {
actionButton = newButton actionButton = newButton
actionButton?.configure(secondaryActionButton, secondaryActionIcon, activity) actionButton?.configure(secondaryActionButton, secondaryActionIcon, activity)

View File

@ -13,9 +13,9 @@ buildscript {
} }
} }
//plugins { plugins {
// id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false id 'com.google.devtools.ksp' version '1.9.24-1.0.20' apply false
//} }
allprojects { allprojects {
repositories { repositories {

View File

@ -1,3 +1,7 @@
## 5.2.1
* fixed issue of play/pause button not correctly updated in Queue
## 5.2.0 ## 5.2.0
* suppressed log.d messages in release app (unbelievable incomplete suppression last time) * suppressed log.d messages in release app (unbelievable incomplete suppression last time)

View File

@ -0,0 +1,4 @@
Version 5.2.1 brings several changes:
* fixed issue of play/pause button not correctly updated in Queue

View File

@ -1,5 +1,5 @@
Podcini is an open source podcast instrument, attuned to Puccini, adorned with pasticcini and aromatized with porcini. Podcini, an open source podcast instrument, attuned to Puccini, adorned with pasticcini and aromatized with porcini, invites your harmonious heartbeats.
It allows you to subscribe to any RSS feed (with or without media), gives you instant access to millions of free and paid podcasts or plain RSS feeds, from independent podcasters to large publishing houses such as the BBC, NPR and CNN. Add, import and export their feeds hassle-free using the Apple Podcasts database, OPML files or simple RSS URLs. It allows you to subscribe to any RSS feed (with or without media), gives you instant access to millions of free and paid podcasts or plain RSS feeds, from independent podcasters to large publishing houses such as the BBC, NPR and CNN. Add, import and export their feeds hassle-free using the Apple Podcasts database, OPML files or simple RSS URLs.