Skip to content

Commit

Permalink
BaseSimilarActivity: display status message when adding to watchlist
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Oct 11, 2024
1 parent 55f69ba commit 920f52b
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ package com.battlelancer.seriesguide.ui

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import com.battlelancer.seriesguide.R
import com.battlelancer.seriesguide.databinding.ActivitySinglepaneBinding
import com.battlelancer.seriesguide.util.commitReorderingAllowed

/**
* Is a [SinglePaneActivity].
* Is a [SinglePaneActivity]. And [BaseMessageActivity] for Trakt watchlist actions.
*/
abstract class BaseSimilarActivity : BaseActivity() {
abstract class BaseSimilarActivity : BaseMessageActivity() {

abstract val liftOnScrollTargetViewId: Int
abstract val titleStringRes: Int
abstract fun createFragment(tmdbId: Int, title: String?): Fragment
private lateinit var binding: ActivitySinglepaneBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val binding = SinglePaneActivity.onCreateFor(this)
binding = SinglePaneActivity.onCreateFor(this)
binding.sgAppBarLayout.sgAppBarLayout.liftOnScrollTargetViewId =
liftOnScrollTargetViewId
setupActionBar()
Expand Down Expand Up @@ -61,6 +64,9 @@ abstract class BaseSimilarActivity : BaseActivity() {
}
}

override val snackbarParentView: View
get() = binding.root

companion object {
private const val EXTRA_TMDB_ID = "EXTRA_TMDB_ID"
private const val EXTRA_TITLE = "EXTRA_TITLE"
Expand Down

0 comments on commit 920f52b

Please sign in to comment.