Skip to content

Commit

Permalink
Remove all usages of some deprecated properties
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Nov 3, 2024
1 parent dafcdac commit 5ab2881
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PerformanceTestActivity : AppCompatActivity() {
.align(Alignment.BottomCenter),
verticalArrangement = Arrangement.spacedBy(4.dp),
) {
if (imageState.subSamplingState?.isImageLoadedInFullQuality == true) {
if (imageState.subSamplingState?.isImageDisplayedInFullQuality == true) {
Text(
text = "Tiles loaded",
color = MaterialTheme.colorScheme.onBackground,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ class SubSamplingImageTest {
zoomableState = zoomableState,
imageSource = remember { imageSource.source(context) }
)
LaunchedEffect(imageState.isImageLoadedInFullQuality) {
isImageDisplayed = imageState.isImageLoadedInFullQuality
LaunchedEffect(imageState.isImageDisplayedInFullQuality) {
isImageDisplayed = imageState.isImageDisplayedInFullQuality
}

SubSamplingImage(
Expand Down Expand Up @@ -160,8 +160,8 @@ class SubSamplingImageTest {
zoomableState = zoomableState,
imageSource = imageSize.source,
)
LaunchedEffect(imageState.isImageLoadedInFullQuality) {
isImageDisplayed = imageState.isImageLoadedInFullQuality
LaunchedEffect(imageState.isImageDisplayedInFullQuality) {
isImageDisplayed = imageState.isImageDisplayedInFullQuality
}

SubSamplingImage(
Expand Down Expand Up @@ -206,7 +206,7 @@ class SubSamplingImageTest {
)
}

rule.waitUntil(5.seconds) { imageState.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { imageState.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity)
}
Expand All @@ -216,7 +216,7 @@ class SubSamplingImageTest {
}

// Wait for full-resolution tiles to load.
rule.waitUntil(5.seconds) { imageState.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { imageState.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity, name = testName.methodName + "_zoomed")
}
Expand All @@ -234,8 +234,8 @@ class SubSamplingImageTest {
zoomableState = zoomableState,
imageSource = imageSource,
)
LaunchedEffect(imageState.isImageLoadedInFullQuality) {
isImageDisplayed = imageState.isImageLoadedInFullQuality
LaunchedEffect(imageState.isImageDisplayedInFullQuality) {
isImageDisplayed = imageState.isImageDisplayedInFullQuality
}

SubSamplingImage(
Expand Down Expand Up @@ -457,7 +457,7 @@ class SubSamplingImageTest {
}
}

rule.waitUntil(5.seconds) { imageState.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { imageState.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity)
}
Expand Down Expand Up @@ -494,8 +494,8 @@ class SubSamplingImageTest {
).asReal().also {
it.showTileBounds = true
}
LaunchedEffect(imageState.isImageLoadedInFullQuality) {
isImageDisplayedInFullQuality = imageState.isImageLoadedInFullQuality
LaunchedEffect(imageState.isImageDisplayedInFullQuality) {
isImageDisplayedInFullQuality = imageState.isImageDisplayedInFullQuality
}

SubSamplingImage(
Expand Down Expand Up @@ -560,23 +560,23 @@ class SubSamplingImageTest {
)
}

rule.waitUntil(5.seconds) { state.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { state.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity)
}

rule.onNodeWithTag("image").performTouchInput {
doubleClick(position = centerLeft)
}
rule.waitUntil(5.seconds) { state.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { state.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity, testName.methodName + "_zoomed")
}

rule.onNodeWithTag("image").performTouchInput {
swipeLeft(startX = centerRight.x, endX = centerLeft.x)
}
rule.waitUntil(5.seconds) { state.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { state.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity, testName.methodName + "_zoomed_panned")
}
Expand Down Expand Up @@ -626,7 +626,7 @@ class SubSamplingImageTest {
}

previewBitmapMutex.unlock()
rule.waitUntil(5.seconds) { state.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { state.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity, name = testName.methodName + "_full_quality")
}
Expand Down Expand Up @@ -658,7 +658,7 @@ class SubSamplingImageTest {
}
}

rule.waitUntil(5.seconds) { state.isImageLoadedInFullQuality }
rule.waitUntil(5.seconds) { state.isImageDisplayedInFullQuality }
rule.runOnIdle {
dropshots.assertSnapshot(rule.activity)
}
Expand Down

0 comments on commit 5ab2881

Please sign in to comment.