File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/src/main/java/org/thoughtcrime/securesms Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class SpoilerRendererDelegate @JvmOverloads constructor(
5656 view.addOnAttachStateChangeListener(object : OnAttachStateChangeListener {
5757 override fun onViewDetachedFromWindow (v : View ) = stopAnimating()
5858 override fun onViewAttachedToWindow (v : View ) {
59- view.getLifecycle().addObserver(object : DefaultLifecycleObserver {
59+ view.getLifecycle()? .addObserver(object : DefaultLifecycleObserver {
6060 override fun onResume (owner : LifecycleOwner ) {
6161 canAnimate = true
6262 systemAnimationsEnabled = ! AccessibilityUtil .areAnimationsDisabled(view.context)
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ fun TextView.setRelativeDrawables(
6464 * Get a lifecycle associated with this view. Care must be taken to ensure
6565 * if activity fallback occurs that the context of the view is correct.
6666 */
67- fun View.getLifecycle (): Lifecycle {
67+ fun View.getLifecycle (): Lifecycle ? {
6868 return try {
6969 findFragment<Fragment >().viewLifecycleOwner.lifecycle
7070 } catch (e: IllegalStateException ) {
71- ViewUtil .getActivityLifecycle(this )!!
71+ ViewUtil .getActivityLifecycle(this )
7272 }
7373}
You can’t perform that action at this time.
0 commit comments