Skip to content

Commit

Permalink
4.4.3 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Mar 29, 2024
1 parent d442601 commit 24e7e67
Show file tree
Hide file tree
Showing 18 changed files with 1,004 additions and 952 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
// Version code schema (not used):
// "1.2.3-beta4" -> 1020304
// "1.2.3" -> 1020395
versionCode 3020118
versionName "4.4.2"
versionCode 3020119
versionName "4.4.3"

def commit = ""
try {
Expand Down
16 changes: 7 additions & 9 deletions app/src/main/java/ac/mdiq/podcini/ui/activity/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import ac.mdiq.podcini.preferences.UserPreferences.hiddenDrawerItems
import ac.mdiq.podcini.receiver.MediaButtonReceiver.Companion.createIntent
import ac.mdiq.podcini.storage.DBReader
import ac.mdiq.podcini.storage.model.download.DownloadStatus
import ac.mdiq.podcini.storage.model.feed.FeedItem
import ac.mdiq.podcini.ui.appstartintent.MainActivityStarter
import ac.mdiq.podcini.ui.common.ThemeUtils.getDrawableFromAttr
import ac.mdiq.podcini.ui.dialog.RatingDialog
Expand Down Expand Up @@ -592,10 +591,9 @@ class MainActivity : CastEnabledActivity() {
}
bottomSheet.setState(BottomSheetBehavior.STATE_COLLAPSED)
}
intent.hasExtra(EXTRA_EPISODES) -> {
val episodes = (if (Build.VERSION.SDK_INT >= 33) intent.getSerializableExtra(EXTRA_EPISODES)
else intent.getSerializableExtra(EXTRA_EPISODES)) as ArrayList<FeedItem>
loadChildFragment(EpisodesListFragment.newInstance(episodes))
intent.hasExtra(EXTRA_FEED_URL) -> {
val feedurl = intent.getStringExtra(EXTRA_FEED_URL)
if (feedurl != null) loadChildFragment(OnlineFeedViewFragment.newInstance(feedurl))
}
intent.hasExtra(MainActivityStarter.EXTRA_FRAGMENT_TAG) -> {
val tag = intent.getStringExtra(MainActivityStarter.EXTRA_FRAGMENT_TAG)
Expand Down Expand Up @@ -736,11 +734,11 @@ class MainActivity : CastEnabledActivity() {
const val PREF_IS_FIRST_LAUNCH: String = "prefMainActivityIsFirstLaunch"

const val EXTRA_FEED_ID: String = "fragment_feed_id"
const val EXTRA_FEED_URL: String = "fragment_feed_url"
const val EXTRA_REFRESH_ON_START: String = "refresh_on_start"
const val EXTRA_STARTED_FROM_SEARCH: String = "started_from_search"
const val EXTRA_ADD_TO_BACK_STACK: String = "add_to_back_stack"
const val KEY_GENERATED_VIEW_ID: String = "generated_view_id"
const val EXTRA_EPISODES: String = "episodes_list"

@JvmStatic
fun getIntentToOpenFeed(context: Context, feedId: Long): Intent {
Expand All @@ -750,12 +748,12 @@ class MainActivity : CastEnabledActivity() {
return intent
}

fun openEpisodesList(context: Context, episodes: ArrayList<FeedItem>): Intent {
@JvmStatic
fun showOnlineFeed(context: Context, feedUrl: String): Intent {
val intent = Intent(context.applicationContext, MainActivity::class.java)
intent.putExtra(EXTRA_EPISODES, episodes)
intent.putExtra(EXTRA_FEED_URL, feedUrl)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
return intent
}

}
}
Loading

0 comments on commit 24e7e67

Please sign in to comment.