Skip to content

Commit

Permalink
Set media view preload to 4
Browse files Browse the repository at this point in the history
Preloads up to 4 extra media in the background for smoother access

Signed-off-by: IacobIonut01 <[email protected]>
  • Loading branch information
IacobIonut01 committed Nov 10, 2024
1 parent ef7ba54 commit 5c7160f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
applicationId = "com.dot.gallery"
minSdk = 30
targetSdk = 35
versionCode = 31001
versionCode = 31005
versionName = "3.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ fun MediaViewScreen(
durationMillis = DEFAULT_LOW_VELOCITY_SWIPE_DURATION
)
),
beyondViewportPageCount = 4,
key = { index ->
mediaState.value.media.getOrNull(index) ?: "empty"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ fun EncryptedMediaViewScreen(
durationMillis = DEFAULT_LOW_VELOCITY_SWIPE_DURATION
)
),
beyondViewportPageCount = 4,
key = { index ->
state.media.getOrNull(index) ?: "empty"
},
Expand Down

0 comments on commit 5c7160f

Please sign in to comment.