Skip to content

Commit

Permalink
6.15.7 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Dec 11, 2024
1 parent 92cd81b commit 1abfc77
Show file tree
Hide file tree
Showing 31 changed files with 1,206 additions and 1,684 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
vectorDrawables.useSupportLibrary false
vectorDrawables.generatedDensities = []

versionCode 3020316
versionName "6.15.6"
versionCode 3020317
versionName "6.15.7"

applicationId "ac.mdiq.podcini.R"
def commit = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ import java.util.concurrent.atomic.AtomicBoolean
import kotlin.Throws
import kotlin.math.max

/*
* An inconvenience of an implementation like this is that some members and methods that once were
* private are now protected, allowing for access from classes of the same package, namely
* PlaybackService. A workaround would be to move this to a dedicated package.
*/
/**
* Abstract class that allows for different implementations of the PlaybackServiceMediaPlayer for local
* and remote (cast devices) playback.
*/
abstract class MediaPlayerBase protected constructor(protected val context: Context, protected val callback: MediaPlayerCallback) {

@Volatile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class MainActivity : CastEnabledActivity() {
_binding = null
// realm.close()
bottomSheet.removeBottomSheetCallback(bottomSheetCallback)
drawerLayout?.removeDrawerListener(drawerToggle!!)
if (drawerToggle != null) drawerLayout?.removeDrawerListener(drawerToggle!!)
MediaController.releaseFuture(controllerFuture)
super.onDestroy()
}
Expand Down Expand Up @@ -604,6 +604,10 @@ class MainActivity : CastEnabledActivity() {
}
}

fun openDrawer() {
drawerLayout?.openDrawer(navDrawer)
}

private var eventSink: Job? = null
private var eventStickySink: Job? = null
private fun cancelFlowEvents() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class VideoplayerActivity : CastEnabledActivity() {
// TODO: consider enable this
// requestCastButton(menu)
val inflater = menuInflater
inflater.inflate(R.menu.mediaplayer, menu)
inflater.inflate(R.menu.videoplayer, menu)
return true
}

Expand Down
22 changes: 13 additions & 9 deletions app/src/main/kotlin/ac/mdiq/podcini/ui/compose/Composables.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ package ac.mdiq.podcini.ui.compose
import ac.mdiq.podcini.R
import ac.mdiq.podcini.preferences.UserPreferences.appPrefs
import ac.mdiq.podcini.ui.activity.MainActivity
import ac.mdiq.podcini.ui.fragment.EpisodeInfoFragment
import ac.mdiq.podcini.ui.utils.ShownotesCleaner
import ac.mdiq.podcini.util.FlowEvent
import ac.mdiq.podcini.util.IntentUtils
import ac.mdiq.podcini.util.Logd
import android.app.Activity
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ForegroundColorSpan
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -32,9 +24,12 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.viewinterop.AndroidView
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.compose.LocalLifecycleOwner
import com.google.android.material.bottomsheet.BottomSheetBehavior
import kotlinx.coroutines.delay

Expand Down Expand Up @@ -288,3 +283,12 @@ fun MediaPlayerErrorDialog(activity: Activity, message: String, showDialog: Muta
)
}
}

@Composable
fun ComposableLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, onEvent: (LifecycleOwner, Lifecycle.Event) -> Unit) {
DisposableEffect(lifecycleOwner) {
val observer = LifecycleEventObserver { source, event -> onEvent(source, event) }
lifecycleOwner.lifecycle.addObserver(observer)
onDispose { lifecycleOwner.lifecycle.removeObserver(observer) }
}
}
582 changes: 252 additions & 330 deletions app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/EpisodeInfoFragment.kt

Large diffs are not rendered by default.

290 changes: 144 additions & 146 deletions app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/FeedEpisodesFragment.kt

Large diffs are not rendered by default.

Loading

0 comments on commit 1abfc77

Please sign in to comment.