Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Conversation

@rafaelks
Copy link
Contributor

This pull-request adds the support to Directory on the iOS app and also some minor bug fixes:

  • Fixed problem with 24 hour clocks not enabled in certain timezones;
  • Fixed problem on displaying threads titles;
  • Added parent channel property to the Subscription model;

Closes #2290

@rafaelks rafaelks added this to the 3.4.0 milestone Mar 19, 2019
}

@objc func recognizeDirectoryTapGesture(_ recognizer: UITapGestureRecognizer) {
guard let controller = UIStoryboard(name: "Directory", bundle: Bundle.main).instantiateInitialViewController() else { return }

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 134 characters (line_length)

#endif

private func _display(_ image: Image, _ transition: ImageLoadingOptions.Transition?, _ fromMemCache: Bool, _ newContentMode: _ContentMode?) {
private func _display(_ image: Image, _ transition: ImageLoadingOptions.Transition?, _ alwaysTransition: Bool, _ fromMemCache: Bool, _ newContentMode: _ContentMode?) {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 171 characters (line_length)

_display(image, options.transition, options.alwaysTransition, fromMemCache, options.contentModes?.success)
} else if let failureImage = options.failureImage {
_display(failureImage, options.failureImageTransition, fromMemCache, options.contentModes?.failure)
_display(failureImage, options.failureImageTransition, options.alwaysTransition, fromMemCache, options.contentModes?.failure)

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 137 characters (line_length)

/// The image transition animation performed when displaying a failure image.
/// `.nil` by default.
public var failureImageTransition: Transition?

Choose a reason for hiding this comment

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

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


extension DirectoryViewController {

override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 121 characters (line_length)

}

func cellFor(channel: UnmanagedSubscription, at indexPath: IndexPath) -> DirectoryChannelCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: DirectoryChannelCell.identifier, for: indexPath) as? DirectoryChannelCell else {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 151 characters (line_length)

}

func cellFor(user: UnmanagedUser, at indexPath: IndexPath) -> DirectoryUserCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: DirectoryUserCell.identifier, for: indexPath) as? DirectoryUserCell else {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 145 characters (line_length)

let sort = type == .channels ? "sort={\"usersCount\":-1}&" : "sort={\"username\":1}&"

if let encodedQuery = query.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
self.query = "\(sort)query={\"text\": \"\(encodedQuery)\", \"type\": \"\(type)\", \"workspace\": \"\(workspace)\"}"

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)

@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #2588 into develop will decrease coverage by 0.35%.
The diff coverage is 2.67%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2588      +/-   ##
===========================================
- Coverage     26.6%   26.25%   -0.36%     
===========================================
  Files          456      463       +7     
  Lines        16903    17139     +236     
===========================================
+ Hits          4497     4499       +2     
- Misses       12406    12640     +234
Impacted Files Coverage Δ
Rocket.Chat/Models/Mapping/UserModelMapping.swift 100% <ø> (ø) ⬆️
...t/Views/Subscriptions/SubscriptionsTitleView.swift 16.66% <ø> (+4.16%) ⬆️
...at/Models/Subscription/UnmanagedSubscription.swift 0% <ø> (ø) ⬆️
Rocket.Chat/Models/User/UnmanagedUser.swift 0% <ø> (ø) ⬆️
...Chat/Models/Mapping/SubscriptionModelMapping.swift 87.71% <ø> (ø) ⬆️
Rocket.Chat/Models/User/User.swift 91.42% <ø> (ø) ⬆️
...ubscriptionsList/SubscriptionsViewController.swift 2.46% <0%> (-0.02%) ⬇️
...Chat/Views/Cells/Directory/DirectoryUserCell.swift 0% <0%> (ø)
...ontrollers/Chat/ChannelActionsViewController.swift 0% <0%> (ø) ⬆️
...et.Chat/Views/Directory/DirectoryFiltersView.swift 0% <0%> (ø)
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 576f950...723a834. Read the comment docs.

@rafaelks rafaelks marked this pull request as ready for review March 19, 2019 21:34
@rafaelks rafaelks merged commit e627690 into develop Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW] Directory of Channels and Users

3 participants