Skip to content

Commit

Permalink
Merge pull request #1486 from urbanairship/release-18.1.4
Browse files Browse the repository at this point in the history
Release 18.1.4
  • Loading branch information
jyaganeh authored Jul 31, 2024
2 parents 0b858e0 + a6334c5 commit 6bf0a22
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

[Migration Guides](https://github.com/urbanairship/android-library/tree/main/documentation/migration)

## Version 18.1.4, July 31, 2024
Patch release that includes bug fixes for Embedded Content.

### Changes
- Fixed an issue with dismissing Embedded Content after pausing and resuming the app.
- Updated the default `PreferenceCenterFragment` to scope the `PreferenceCenterViewModel` to the fragment's view lifecycle.

## Version 18.1.3, July 30, 2024
Patch release that includes bug fixes for Embedded Content and Preference Center, and accessibility improvements for Message Center.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
// Airship Version - major.minor.patch
airshipVersion = '18.1.3'
airshipVersion = '18.1.4'

// Airship Version Qualifier beta, release, etc...
// airshipVersionQualifier = "alpha"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ internal class PagerModel(
}

private fun resumeStory() {
UALog.v { "resume story" }
if (automatedActionsTimers.isNotEmpty()) {
UALog.v { "resume story" }
}

navigationActionTimer?.start()
for (timer in automatedActionsTimers) {
timer.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import android.widget.TextView
import androidx.annotation.VisibleForTesting
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModels
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.viewModelScope
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -78,8 +80,14 @@ public class PreferenceCenterFragment : Fragment(R.layout.ua_fragment_preference
requireNotNull(arguments?.getString(ARG_ID)) { "Missing required argument: PreferenceCenterFragment.ARG_ID" }
}

private val viewModel: PreferenceCenterViewModel by activityViewModels {
PreferenceCenterViewModel.factory(preferenceCenterId)
private val viewModel by lazy {
ViewModelProvider(
owner = this, // Scope the ViewModel to the Fragment's lifecycle.
factory = PreferenceCenterViewModel.factory(preferenceCenterId)
).get(
key = preferenceCenterId, // Ensure we create a unique VM per pref center ID.
modelClass = PreferenceCenterViewModel::class.java
)
}

@VisibleForTesting
Expand Down

0 comments on commit 6bf0a22

Please sign in to comment.