No support for RTL direction (arabic)

I noticed some bugs on devices with RTL direction (arabic)

  1. SBUChannelListViewController - channel table view cell contains only the avatar (no nickname and message preview)
  2. SBUChannelViewController - image and channel name in the navigation bar are in LTR direction
  3. Attachment source selection sheet is in LTR

It is kind of blocker for us as our app target country uses arabic language. I guess fixes on your side will be easy (replacing right/left with trailing/leading). In LTR everything looks great so we prefer to not implement custom views by our own.

Fix for 1:
in SBUChannelCell.swift line 86-88

            .sbu_constraint(equalTo: self.contentView, left: kSideMarging, top: 10, bottom: 10)
            .sbu_constraint(width: kCoverImageSize, height: kCoverImageSize)

left should be replaced with leading

            .sbu_constraint(equalTo: self.contentView, leading: kSideMarging, top: 10, bottom: 10)
            .sbu_constraint(width: kCoverImageSize, height: kCoverImageSize)

Fix for 2:
SBUChannelTitleView uses left/right instead of leading/trailing

To fix it I had to write my own channel title view class
I think that SBUChannelViewController should be more flexible to inject custom channel title view, for now he is expecting only SBUChannelTitleView which is not accesible from the outside. Maybe some new protocol should be added like:

protocol ChannelTitleViewProtocol {
     func configure(channel: SBDBaseChannel?, title: String?)
     func updateChannelStatus(channel: SBDBaseChannel?)
     func setupStyles()