setTapGestureHandler and setLongTabGestureHandler do not trigger when we register different cells for user messages and file messages

Using UIKit version 1.0.9

In a subclass of SBUChannelViewController,
If I register my own custom user cell or file cell (and they are subclasses of SBUBaseMessageCell)
then setTapGestureHandler and setLongTabGestureHandler do not get triggered for them. Is this a bug or is it expected behavior?

@saitejamm

setTapGestureHandler and setLongTabGestureHandler are not going to triggered because its setter where you can set gesture. That being said, you have to create your own recognizer in that method and register if you want to subclass baseMessageCell.

On the other hand, you can subclass from UserMessageCell or FileMessageCell and take advantage on below methods

open func onLongPressContentView(sender: UILongPressGestureRecognizer) {}
open func onTapContentView(sender: UITapGestureRecognizer) {}
open func onTapProfileImageView(sender: UITapGestureRecognizer) {}

and override whichever you want like below

override func onTapContentView(sender: UITapGestureRecognizer) {
  super.onTapContentView(sender: sender)
  // your logic when tap on content 
}

:thinking: I see that SBUUserMessageCell and SBUFileMessageCell are not open so they are not inheritable. I inherited from SBUBaseMessageCell

Actually I see a lot of public but not open classes and functions from the UIKit SDK that are I can not inherit/override in my code because of this (e.g. some functions in SBUChannelViewController).

Not sure if this is expected behavior or if it is a bug.

Hi @saitejamm

Sorry too late checking.

Only SBUBaseMessageCell can be inherited in the current version.
We’re opening the code considering the conflict with internal logic.
Update versions that have SBUUserMessageCell and SBUFileMessageCell modified to open class will be released within 1-2 weeks.
Sorry for the inconvenience in implementing it.
Please check the update after next week.

Thanks for reporting :pray:

Alright, Thanks for the response