Skip to content

WMSDK-466: made SlidingExpiration parameters independent#590

Merged
sergeysozinov merged 5 commits into
mission/inapp-display-controlfrom
feature/WMSDK-466
May 26, 2025
Merged

WMSDK-466: made SlidingExpiration parameters independent#590
sergeysozinov merged 5 commits into
mission/inapp-display-controlfrom
feature/WMSDK-466

Conversation

@sergeysozinov
Copy link
Copy Markdown
Collaborator

@sergeysozinov sergeysozinov requested review from Copilot and enotniy May 26, 2025 07:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the changes required for WMSDK-466, making the SlidingExpiration parameters independent by changing their types from String to Milliseconds and updating the corresponding tests and deserialization logic. Key changes include:

  • Updating the SettingsStub and related tests to use Milliseconds instead of time span strings.
  • Adjusting the MobileConfigSettingsManager and MobileConfigRepositoryImpl to work with the new parameter type and conversion methods.
  • Renaming and updating test cases and deserializer registration to reflect the revised SlidingExpiration semantics.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/src/test/java/cloud/mindbox/mobile_sdk/models/SettingsStub.kt Updated getSlidingExpiration to accept Milliseconds parameters.
sdk/src/test/java/cloud/mindbox/mobile_sdk/managers/MobileConfigSettingsManagerTest.kt Tests now pass Milliseconds values instead of formatted strings.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/managers/serialization/SettingsMobileConfigSerializationManagerTest.kt Renamed tests and updated error message verbiage for sliding expiration.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/dto/deserializers/SlidingExpirationDtoBlankDeserializerTest.kt Added tests for the new deserialization behavior.
sdk/src/main/java/cloud/mindbox/mobile_sdk/models/operation/response/InAppConfigResponse.kt Changed slidingExpiration properties to use Milliseconds.
sdk/src/main/java/cloud/mindbox/mobile_sdk/managers/MobileConfigSettingsManagerImpl.kt Modified session time and keepalive logic to use the new Milliseconds interval.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/repositories/MobileConfigRepositoryImpl.kt Updated the conversion and validation logic for sliding expiration parameters.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/dto/deserializers/SidingExpirationDtoBlankDeserializer.kt Added new deserializer for SlidingExpirationDtoBlank.
sdk/src/main/java/cloud/mindbox/mobile_sdk/di/modules/DataModule.kt Registered the new SlidingExpiration deserializer.
Comments suppressed due to low confidence (1)

sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/dto/deserializers/SidingExpirationDtoBlankDeserializer.kt:11

  • The file name 'SidingExpirationDtoBlankDeserializer.kt' appears to contain a typo. It should likely be renamed to 'SlidingExpirationDtoBlankDeserializer.kt' to match the class name and maintain consistency.
internal class SlidingExpirationDtoBlankDeserializer : JsonDeserializer<SlidingExpirationDtoBlank> {

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes the SlidingExpiration parameters independent by refactoring them from string-based representations to use a dedicated Milliseconds type. Key changes include updating method signatures and test cases to use Milliseconds, renaming tests and assertion messages for clarity, and registering a new deserializer for sliding expiration.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/src/test/java/cloud/mindbox/mobile_sdk/models/SettingsStub.kt Updated getSlidingExpiration parameters to use Milliseconds instead of String.
sdk/src/test/java/cloud/mindbox/mobile_sdk/managers/MobileConfigSettingsManagerTest.kt Updated test cases to use Milliseconds values for sliding expiration parameters.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/managers/serialization/SettingsMobileConfigSerializationManagerTest.kt Renamed test methods and updated assertion messages for sliding expiration errors.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/dto/deserializers/SidingExpirationDtoBlankDeserializer.kt Added a new deserializer for SlidingExpiration and registered it in the DI module.
sdk/src/main/java/cloud/mindbox/mobile_sdk/models/operation/response/InAppConfigResponse.kt Updated SlidingExpirationDto to use Milliseconds values.
sdk/src/main/java/cloud/mindbox/mobile_sdk/managers/MobileConfigSettingsManagerImpl.kt Replaced parseTimeSpanToMillis calls with property access (.interval) and adjusted logic accordingly.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/repositories/MobileConfigRepositoryImpl.kt Updated converter logic for sliding expiration using Milliseconds type.
sdk/src/main/java/cloud/mindbox/mobile_sdk/di/modules/DataModule.kt Registered the new SlidingExpirationDtoBlankDeserializer.
Comments suppressed due to low confidence (1)

sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/dto/deserializers/SidingExpirationDtoBlankDeserializer.kt:1

  • The file name 'SidingExpirationDtoBlankDeserializer.kt' contains a typo; consider renaming it to 'SlidingExpirationDtoBlankDeserializer.kt' to match the class name and ensure consistency.
package cloud.mindbox.mobile_sdk.inapp.data.dto.deserializers

Comment thread sdk/src/main/java/cloud/mindbox/mobile_sdk/di/modules/DataModule.kt Outdated
Comment thread sdk/src/main/java/cloud/mindbox/mobile_sdk/di/modules/DataModule.kt Outdated
@sergeysozinov sergeysozinov requested a review from enotniy May 26, 2025 09:06
@sergeysozinov sergeysozinov merged commit ddd6286 into mission/inapp-display-control May 26, 2025
4 checks passed
@sergeysozinov sergeysozinov deleted the feature/WMSDK-466 branch May 26, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants