MOBILE-52: Add timeout for in-app image loading#720
Merged
Conversation
534e83f to
e83eac5
Compare
There was a problem hiding this comment.
Pull request overview
This PR aims to enforce a timeout and screen-bounded sizing for in-app image loading to avoid long hangs and overly large image decodes during in-app rendering.
Changes:
- Added coroutine-level timeout handling and screen-size-based image preloading in
InAppGlideImageLoaderImpl. - Updated in-app view image loading to apply timeout, caching strategy, and sizing constraints.
- Added unit tests covering success/failure/timeout/cancellation behavior for the Glide-based image loader.
Reviewed changes
Copilot reviewed 4 out of 4 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/inapp/data/managers/InAppGlideImageLoaderImplTest.kt | Adds unit tests validating image load success/failure, timeout behavior, and cancellation cleanup. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/managers/GatewayManager.kt | Modifies mobile config fetching behavior (currently returns hardcoded JSON instead of network response). |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/AbstractInAppViewHolder.kt | Applies timeout + size override + cache strategy when loading in-app images into views. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/managers/InAppGlideImageLoaderImpl.kt | Implements timeout-aware Glide preload with sizing and improved error handling. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/Extensions.kt | Adds Context.maxScreenDimension() helper used to bound image sizes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sergeysozinov
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILE-52