minor bug fixes
This commit is contained in:
parent
45abbd34b9
commit
14d823ad3d
|
@ -22,8 +22,8 @@ android {
|
|||
// Version code schema:
|
||||
// "1.2.3-beta4" -> 1020304
|
||||
// "1.2.3" -> 1020395
|
||||
versionCode 3020096
|
||||
versionName "3.2.1"
|
||||
versionCode 3020097
|
||||
versionName "3.2.2"
|
||||
|
||||
def commit = ""
|
||||
try {
|
||||
|
|
|
@ -326,8 +326,8 @@ abstract class EpisodesListFragment : Fragment(), SelectableAdapter.OnSelectMode
|
|||
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onEventMainThread(event: PlaybackPositionEvent) {
|
||||
for (i in 0 until listAdapter.itemCount) {
|
||||
val holder: EpisodeItemViewHolder = recyclerView.findViewHolderForAdapterPosition(i) as EpisodeItemViewHolder
|
||||
if (holder.isCurrentlyPlayingItem) {
|
||||
val holder: EpisodeItemViewHolder? = recyclerView.findViewHolderForAdapterPosition(i) as? EpisodeItemViewHolder
|
||||
if (holder != null && holder.isCurrentlyPlayingItem) {
|
||||
holder.notifyPlaybackPositionUpdated(event)
|
||||
break
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ class FeedItemlistFragment : Fragment(), AdapterView.OnItemClickListener, Toolba
|
|||
fun onEventMainThread(event: PlaybackPositionEvent) {
|
||||
for (i in 0 until adapter.itemCount) {
|
||||
val holder: EpisodeItemViewHolder? =
|
||||
viewBinding.recyclerView.findViewHolderForAdapterPosition(i) as EpisodeItemViewHolder?
|
||||
viewBinding.recyclerView.findViewHolderForAdapterPosition(i) as? EpisodeItemViewHolder
|
||||
if (holder != null && holder.isCurrentlyPlayingItem) {
|
||||
holder.notifyPlaybackPositionUpdated(event)
|
||||
break
|
||||
|
|
|
@ -286,9 +286,9 @@ class SearchFragment : Fragment(), SelectableAdapter.OnSelectModeListener {
|
|||
@UnstableApi @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onEventMainThread(event: PlaybackPositionEvent) {
|
||||
for (i in 0 until adapter.itemCount) {
|
||||
val holder: EpisodeItemViewHolder =
|
||||
recyclerView.findViewHolderForAdapterPosition(i) as EpisodeItemViewHolder
|
||||
if (holder.isCurrentlyPlayingItem) {
|
||||
val holder: EpisodeItemViewHolder? =
|
||||
recyclerView.findViewHolderForAdapterPosition(i) as? EpisodeItemViewHolder
|
||||
if (holder != null && holder.isCurrentlyPlayingItem) {
|
||||
holder.notifyPlaybackPositionUpdated(event)
|
||||
break
|
||||
}
|
||||
|
|
|
@ -59,10 +59,10 @@ class SubscriptionFragment : Fragment(), Toolbar.OnMenuItemClickListener, Select
|
|||
private lateinit var toolbar: MaterialToolbar
|
||||
private lateinit var swipeRefreshLayout: SwipeRefreshLayout
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var displayedFolder: String
|
||||
private lateinit var prefs: SharedPreferences
|
||||
private lateinit var speedDialView: SpeedDialView
|
||||
|
||||
|
||||
private var displayedFolder: String = ""
|
||||
private var displayUpArrow = false
|
||||
|
||||
private var disposable: Disposable? = null
|
||||
|
|
|
@ -165,7 +165,6 @@ class PlaybackService : MediaBrowserServiceCompat() {
|
|||
stateManager = PlaybackServiceStateManager(this)
|
||||
notificationBuilder = PlaybackServiceNotificationBuilder(this)
|
||||
|
||||
// TODO: this shit doesn't work
|
||||
if (Build.VERSION.SDK_INT >= VERSION_CODES.TIRAMISU) {
|
||||
registerReceiver(autoStateUpdated, IntentFilter("com.google.android.gms.car.media.STATUS"), RECEIVER_NOT_EXPORTED)
|
||||
registerReceiver(shutdownReceiver, IntentFilter(PlaybackServiceInterface.ACTION_SHUTDOWN_PLAYBACK_SERVICE), RECEIVER_NOT_EXPORTED)
|
||||
|
|
|
@ -48,9 +48,9 @@ object MediaSizeLoader {
|
|||
try {
|
||||
val response = client.newCall(httpReq.build()).execute()
|
||||
if (response.isSuccessful) {
|
||||
val contentLength = response.header("Content-Length")
|
||||
val contentLength = response.header("Content-Length")?:"0"
|
||||
try {
|
||||
size = contentLength!!.toInt().toLong()
|
||||
size = contentLength.toInt().toLong()
|
||||
} catch (e: NumberFormatException) {
|
||||
Log.e(TAG, Log.getStackTraceString(e))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue