Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Improvement - Pin In Forward Room List
Browse files Browse the repository at this point in the history
also change segment color in forward room list
  • Loading branch information
saeedmozaffariGithub committed Feb 19, 2018
1 parent 25cddcc commit 6848b81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ class IGForwardMessageTableViewController: UITableViewController {

override func viewDidLoad() {
super.viewDidLoad()
self.rooms = try! Realm().objects(IGRoom.self).filter("isParticipant = 1").sorted(byKeyPath: "sortimgTimestamp", ascending: false)
let sortProperties = [SortDescriptor(keyPath: "pinId", ascending: false), SortDescriptor(keyPath: "sortimgTimestamp", ascending: false)]
self.rooms = try! Realm().objects(IGRoom.self).filter("isParticipant = 1 AND isReadOnly = false").sorted(by: sortProperties)
self.tableView.tableFooterView = UIView()
let navigationItem = self.navigationItem as! IGNavigationItem
navigationItem.addModalViewItems(leftItemText: nil, rightItemText: "Cancel", title: nil)
Expand All @@ -90,7 +91,7 @@ class IGForwardMessageTableViewController: UITableViewController {


self.tableView.register(IGChatRoomListTableViewCell.nib(), forCellReuseIdentifier: IGChatRoomListTableViewCell.cellReuseIdentifier())

self.tableView.tableFooterView = UIView()
self.tableView.backgroundColor = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
self.view.backgroundColor = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
self.tableView.tableHeaderView?.backgroundColor = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
Expand Down
5 changes: 3 additions & 2 deletions iGap/VIew/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ Cg
<segment title="Chat"/>
<segment title="Contact"/>
</segments>
<color key="tintColor" red="0.0" green="0.69019607839999997" blue="0.74901960779999999" alpha="1" colorSpace="calibratedRGB"/>
<color key="tintColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="didChangedSegmentValue:" destination="yQZ-92-FlH" eventType="valueChanged" id="FeP-jy-Pn7"/>
</connections>
Expand Down Expand Up @@ -5042,13 +5042,14 @@ Cg
<image name="IG_Tabbar_Recent_On" width="25" height="25"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="Paj-YA-riE"/>
<segue reference="jRj-hY-oEr"/>
<segue reference="Z1Q-fW-ByF"/>
<segue reference="k1z-sz-mLi"/>
<segue reference="xjE-gJ-o8r"/>
<segue reference="Whi-Zq-oPV"/>
<segue reference="liy-Td-nok"/>
<segue reference="I27-tX-EAz"/>
<segue reference="ebc-Vg-0Gq"/>
<segue reference="OlC-Gu-0Zm"/>
</inferredMetricsTieBreakers>
</document>

0 comments on commit 6848b81

Please sign in to comment.