Skip to content

Conversation

@ASalavei
Copy link

@ASalavei ASalavei commented Nov 19, 2025

Preliminary refactoring before the https://youtrack.jetbrains.com/issue/CMP-8478/Implement-UIView-based-compose-injection-API

  • Rename CMPViewControllerLifecycleDelegate to CMPComposeContainerLifecycleDelegate as well as corresponding ComposeContainerLifecycleDelegate in Kotlin code.
  • Implement UIView-based superclass CMPView that able to track visibility based on superview + window combination, similar to the CMPViewController.
  • Exposes Obj-C interface userInterfaceStyleDidChange to monitor changes for various iOS versions

Release Notes

N/A

@ASalavei ASalavei requested a review from svastven November 20, 2025 10:17
switch (self->_lifecycleState) {
case CMPComposeContainerLifecycleStateInitialized:
case CMPComposeContainerLifecycleStateStopped:
assert(false);
Copy link

@mazunin-v-jb mazunin-v-jb Nov 21, 2025

Choose a reason for hiding this comment

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

maybe we could either add a short comment on why these cases uses assert, or consider using NSAssert with an explanation? For the maintainability

Copy link
Author

Choose a reason for hiding this comment

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

Good catch. That's actually an incorrect assertion. It should check only the Initialized because Stopped is a valid state here because we're not canceling the scheduled work item.

@mazunin-v-jb mazunin-v-jb self-requested a review November 21, 2025 18:37
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.

4 participants