Skip to content

Typing indicator invalid sections #1108

@hendyevan

Description

@hendyevan

Hi, i encountered an issue when i want to show typing indicator.

'Invalid update: invalid number of sections.  The number of sections contained in the collection view after the update (2) must be equal to the number of sections contained in the collection view before the update (2), plus or minus the number of sections inserted or deleted (0 inserted, 1 deleted).

My code are based on the example project :

func setTypingIndicatorViewHidden(_ isHidden: Bool, performUpdates updates: (() -> Void)? = nil) {
        setTypingIndicatorViewHidden(isHidden, animated: true, whilePerforming: updates) { [weak self] success in
            if success, self?.isLastSectionVisible() == true {
                self?.messagesCollectionView.scrollToBottom(animated: true)
            }
        }
    }

and im calling it like :

self.setTypingIndicatorViewHidden(false)

Is there any step or configuration that i missed?

  • MessageKit version : 3.0.0
  • iOS version : 12
  • Swift version : 4.2
  • Testing on : Simulator

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions