Skip to content

Handling Updates When Table Is Out of View #10

Open
@myyra

Description

@myyra

We have a case where a table view is subscribed to a publisher that is continuously updated when the app is running.

When pushing a view controller on top the one the table is in (in a navigation stack), it will generate warnings and glitch because it's updated while being out of view.

Per https://forums.developer.apple.com/thread/120790, it seems to be because of animations.

I tried simple stuff like cancelling the subscription on viewDidDisappear and adding it again in viewWillAppear, and filtering the updates by checking if the table has a window (a suggested solution in the linked thread). Both seem to work but have pretty serious drawbacks and won't fix the problem completely.

Is this something that should be handled within the framework? Fixing it completely will cause so much boilerplate with CombineDataSources that it starts to lose its elegance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions