diff --git a/README.md b/README.md index cec4e46f..6a189f5a 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ This is based on a fork from the popular project AntennaPod ( diff --git a/app/build.gradle b/app/build.gradle index f137841f..01250740 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,8 +22,8 @@ android { // Version code schema: // "1.2.3-beta4" -> 1020304 // "1.2.3" -> 1020395 - versionCode 3020101 - versionName "4.0.1" + versionCode 3020102 + versionName "4.1.0" def commit = "" try { diff --git a/app/src/main/java/ac/mdiq/podcini/storage/NavDrawerData.kt b/app/src/main/java/ac/mdiq/podcini/storage/NavDrawerData.kt index 2a94f64b..0eb75f49 100644 --- a/app/src/main/java/ac/mdiq/podcini/storage/NavDrawerData.kt +++ b/app/src/main/java/ac/mdiq/podcini/storage/NavDrawerData.kt @@ -9,25 +9,13 @@ class NavDrawerData(@JvmField val items: List, val feedCounters: Map, val reclaimableSpace: Int ) { - abstract class DrawerItem(val type: Type, var id: Long) { - enum class Type { - FEED - } + class FeedDrawerItem(val feed: Feed, val id: Long, val counter: Int) { + var layer: Int = 0 - var layer: Int = 0 - - abstract val title: String? - - open val producer: String = "" - - abstract val counter: Int - } - - class FeedDrawerItem(val feed: Feed, id: Long, override val counter: Int) : DrawerItem(Type.FEED, id) { - override val title: String? + val title: String? get() = feed.title - override val producer: String + val producer: String get() = feed.author?:"" } } diff --git a/app/src/main/java/ac/mdiq/podcini/ui/adapter/NavListAdapter.kt b/app/src/main/java/ac/mdiq/podcini/ui/adapter/NavListAdapter.kt index 1a34c74c..ffcc142c 100644 --- a/app/src/main/java/ac/mdiq/podcini/ui/adapter/NavListAdapter.kt +++ b/app/src/main/java/ac/mdiq/podcini/ui/adapter/NavListAdapter.kt @@ -179,11 +179,7 @@ class NavListAdapter(private val itemAccess: ItemAccess, context: Activity) : val item = itemAccess.getItem(itemPos) if (item != null) { bindListItem(item, holder as FeedHolder) - if (item.type == DrawerItem.Type.FEED) { - bindFeedView(item as FeedDrawerItem, holder) - } else { -// bindTagView(item as TagDrawerItem, holder) - } + bindFeedView(item as FeedDrawerItem, holder) } holder.itemView.setOnCreateContextMenuListener(itemAccess) } @@ -276,7 +272,7 @@ class NavListAdapter(private val itemAccess: ItemAccess, context: Activity) : } } - private fun bindListItem(item: DrawerItem, holder: FeedHolder) { + private fun bindListItem(item: FeedDrawerItem, holder: FeedHolder) { if (item.counter > 0) { holder.count.visibility = View.VISIBLE holder.count.text = NumberFormat.getInstance().format(item.counter.toLong()) @@ -348,7 +344,7 @@ class NavListAdapter(private val itemAccess: ItemAccess, context: Activity) : interface ItemAccess : OnCreateContextMenuListener { val count: Int - fun getItem(position: Int): DrawerItem? + fun getItem(position: Int): FeedDrawerItem? fun isSelected(position: Int): Boolean diff --git a/app/src/main/java/ac/mdiq/podcini/ui/adapter/SubscriptionsRecyclerAdapter.kt b/app/src/main/java/ac/mdiq/podcini/ui/adapter/SubscriptionsRecyclerAdapter.kt index b0a06578..da05c06f 100644 --- a/app/src/main/java/ac/mdiq/podcini/ui/adapter/SubscriptionsRecyclerAdapter.kt +++ b/app/src/main/java/ac/mdiq/podcini/ui/adapter/SubscriptionsRecyclerAdapter.kt @@ -169,7 +169,9 @@ open class SubscriptionsRecyclerAdapter(mainActivity: MainActivity) : producer.text = drawerItem.producer coverImage.contentDescription = drawerItem.title if (drawerItem.counter > 0) { - count.text = NumberFormat.getInstance().format(drawerItem.feed.items.size.toLong()) + " episodes" +// TODO: need to use more specific number + count.text = NumberFormat.getInstance().format(drawerItem.counter.toLong()) + " episodes" +// count.text = NumberFormat.getInstance().format(drawerItem.feed.items.size.toLong()) + " episodes" count.visibility = View.VISIBLE } else { count.visibility = View.GONE diff --git a/app/src/main/java/ac/mdiq/podcini/ui/dialog/RenameItemDialog.kt b/app/src/main/java/ac/mdiq/podcini/ui/dialog/RenameItemDialog.kt index 663c8d37..37a98d7e 100644 --- a/app/src/main/java/ac/mdiq/podcini/ui/dialog/RenameItemDialog.kt +++ b/app/src/main/java/ac/mdiq/podcini/ui/dialog/RenameItemDialog.kt @@ -2,10 +2,9 @@ package ac.mdiq.podcini.ui.dialog import ac.mdiq.podcini.R import ac.mdiq.podcini.databinding.EditTextDialogBinding -import ac.mdiq.podcini.storage.model.feed.Feed -import ac.mdiq.podcini.storage.model.feed.FeedPreferences import ac.mdiq.podcini.storage.DBWriter -import ac.mdiq.podcini.storage.NavDrawerData.* +import ac.mdiq.podcini.storage.NavDrawerData.FeedDrawerItem +import ac.mdiq.podcini.storage.model.feed.Feed import android.app.Activity import android.content.DialogInterface import android.util.Log @@ -20,14 +19,14 @@ import java.lang.ref.WeakReference class RenameItemDialog { private val activityRef: WeakReference private var feed: Feed? = null - private var drawerItem: DrawerItem? = null + private var drawerItem: FeedDrawerItem? = null constructor(activity: Activity, feed: Feed?) { this.activityRef = WeakReference(activity) this.feed = feed } - constructor(activity: Activity, drawerItem: DrawerItem?) { + constructor(activity: Activity, drawerItem: FeedDrawerItem?) { this.activityRef = WeakReference(activity) this.drawerItem = drawerItem } diff --git a/app/src/main/java/ac/mdiq/podcini/ui/fragment/ExternalPlayerFragment.kt b/app/src/main/java/ac/mdiq/podcini/ui/fragment/ExternalPlayerFragment.kt index 35daaffe..274bda9d 100644 --- a/app/src/main/java/ac/mdiq/podcini/ui/fragment/ExternalPlayerFragment.kt +++ b/app/src/main/java/ac/mdiq/podcini/ui/fragment/ExternalPlayerFragment.kt @@ -269,7 +269,6 @@ class ExternalPlayerFragment : Fragment(), SeekBar.OnSeekBarChangeListener { txtvFF.text = NumberFormat.getInstance().format(UserPreferences.fastForwardSecs.toLong()) val media = controller?.getMedia() if (media != null) updatePlaybackSpeedButton(SpeedChangedEvent(PlaybackSpeedUtils.getCurrentPlaybackSpeed(media))) - } @UnstableApi diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/4_subscriptions.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/4_subscriptions.jpg index 91cd1750..e5086098 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/4_subscriptions.jpg and b/fastlane/metadata/android/en-US/images/phoneScreenshots/4_subscriptions.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/7_podcast.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/7_podcast.jpg index 36ba875c..b9788611 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/7_podcast.jpg and b/fastlane/metadata/android/en-US/images/phoneScreenshots/7_podcast.jpg differ diff --git a/images/4_subscriptions.jpg b/images/4_subscriptions.jpg index 91cd1750..e5086098 100644 Binary files a/images/4_subscriptions.jpg and b/images/4_subscriptions.jpg differ diff --git a/images/7_podcast.jpg b/images/7_podcast.jpg index 36ba875c..b9788611 100644 Binary files a/images/7_podcast.jpg and b/images/7_podcast.jpg differ