diff --git a/app/build.gradle b/app/build.gradle index 2501affe..0584eb59 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -149,8 +149,8 @@ android { // Version code schema (not used): // "1.2.3-beta4" -> 1020304 // "1.2.3" -> 1020395 - versionCode 3020120 - versionName "4.5.0" + versionCode 3020121 + versionName "4.5.1" def commit = "" try { diff --git a/app/src/main/java/ac/mdiq/podcini/preferences/UserPreferences.kt b/app/src/main/java/ac/mdiq/podcini/preferences/UserPreferences.kt index f237481e..c6c28744 100644 --- a/app/src/main/java/ac/mdiq/podcini/preferences/UserPreferences.kt +++ b/app/src/main/java/ac/mdiq/podcini/preferences/UserPreferences.kt @@ -126,11 +126,12 @@ object UserPreferences { const val NOTIFICATION_BUTTON_NEXT_CHAPTER: Int = 3 const val NOTIFICATION_BUTTON_PLAYBACK_SPEED: Int = 4 const val EPISODE_CACHE_SIZE_UNLIMITED: Int = -1 +// should match those defined in arrays const val FEED_ORDER_COUNTER: Int = 0 const val FEED_ORDER_ALPHABETICAL: Int = 1 - const val FEED_ORDER_MOST_PLAYED: Int = 3 - const val FEED_ORDER_LAST_UPDATED: Int = 4 - const val FEED_ORDER_LAST_UNREAD_UPDATED: Int = 5 + const val FEED_ORDER_LAST_UPDATED: Int = 2 + const val FEED_ORDER_LAST_UNREAD_UPDATED: Int = 3 + const val FEED_ORDER_MOST_PLAYED: Int = 4 const val DEFAULT_PAGE_REMEMBER: String = "remember" private lateinit var context: Context diff --git a/app/src/main/java/ac/mdiq/podcini/storage/DBReader.kt b/app/src/main/java/ac/mdiq/podcini/storage/DBReader.kt index 3d6477ff..77e6eea6 100644 --- a/app/src/main/java/ac/mdiq/podcini/storage/DBReader.kt +++ b/app/src/main/java/ac/mdiq/podcini/storage/DBReader.kt @@ -19,6 +19,7 @@ import ac.mdiq.podcini.preferences.UserPreferences import ac.mdiq.podcini.preferences.UserPreferences.feedCounterSetting import ac.mdiq.podcini.preferences.UserPreferences.feedOrder import ac.mdiq.podcini.storage.model.feed.FeedPreferences.Companion.TAG_ROOT +import java.text.SimpleDateFormat import java.util.* import kotlin.math.min @@ -934,6 +935,7 @@ object DBReader { comparator = Comparator { lhs: Feed, rhs: Feed -> val dateLhs = if (recentPubDates.containsKey(lhs.id)) recentPubDates[lhs.id]!! else 0 val dateRhs = if (recentPubDates.containsKey(rhs.id)) recentPubDates[rhs.id]!! else 0 +// Log.d(TAG, "FEED_ORDER_LAST_UPDATED ${lhs.title} ${SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(Date(dateLhs))}") dateRhs.compareTo(dateLhs) } } @@ -956,7 +958,6 @@ object DBReader { for (feed in feeds) { val counter = if (feedCounters.containsKey(feed.id)) feedCounters[feed.id]!! else 0 val drawerItem = FeedDrawerItem(feed, feed.id, counter) - items.add(drawerItem) } val result = NavDrawerData(items, queueSize, numNewItems, numDownloadedItems, diff --git a/changelog.md b/changelog.md index 82fca184..897c824d 100644 --- a/changelog.md +++ b/changelog.md @@ -198,4 +198,8 @@ * single tap not during play has no effect * the Play button * by default, it behaves the same as usual - * if the user customize "Fallback speed" to a value greater than 0.1, long-press the button during play enters the fallback mode and plays at the set fallback speed, single tap exits the fallback mode \ No newline at end of file + * if the user customize "Fallback speed" to a value greater than 0.1, long-press the button during play enters the fallback mode and plays at the set fallback speed, single tap exits the fallback mode + +## 4.5.1 + +* fixed bug in subscription sorting \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/3020121.txt b/fastlane/metadata/android/en-US/changelogs/3020121.txt new file mode 100644 index 00000000..0763f0e5 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3020121.txt @@ -0,0 +1,4 @@ + +Version 4.5.1 brings several changes: + +* fixed bug in subscription sorting