mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-19 09:46:56 +10:00
Fix cancel new feed and prevent from hard refresh
This commit is contained in:
@@ -8,5 +8,8 @@
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>105</string>
|
||||
<string>106</string>
|
||||
<key>Fabric</key>
|
||||
<dict>
|
||||
<key>APIKey</key>
|
||||
|
||||
@@ -39,12 +39,17 @@ class FeedConversationsViewController: UIViewController {
|
||||
feedConversationsTableView.registerNib(UINib(nibName: feedConversationCellID, bundle: nil), forCellReuseIdentifier: feedConversationCellID)
|
||||
feedConversationsTableView.rowHeight = 80
|
||||
feedConversationsTableView.tableFooterView = UIView()
|
||||
|
||||
realmNotificationToken = realm.addNotificationBlock { [weak self] notification, realm in
|
||||
if let strongSelf = self {
|
||||
strongSelf.haveUnreadMessages = countOfUnreadMessagesInRealm(realm, withConversationType: ConversationType.Group) > 0
|
||||
}
|
||||
}
|
||||
//
|
||||
// realmNotificationToken = realm.addNotificationBlock { [weak self] notification, realm in
|
||||
// if let strongSelf = self {
|
||||
// strongSelf.haveUnreadMessages = countOfUnreadMessagesInRealm(realm, withConversationType: ConversationType.Group) > 0
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
haveUnreadMessages = countOfUnreadMessagesInRealm(realm, withConversationType: ConversationType.Group) > 0
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
@@ -49,7 +49,7 @@ class NewFeedViewController: UIViewController {
|
||||
|
||||
navigationItem.rightBarButtonItem = postButton
|
||||
|
||||
let cancleButton = UIBarButtonItem(title: NSLocalizedString("Cancle", comment: ""), style: .Plain, target: self, action: "cancle:")
|
||||
let cancleButton = UIBarButtonItem(title: NSLocalizedString("Cancel", comment: ""), style: .Plain, target: self, action: "cancel:")
|
||||
|
||||
navigationItem.leftBarButtonItem = cancleButton
|
||||
|
||||
@@ -96,7 +96,7 @@ class NewFeedViewController: UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
func cancle(sender: UIBarButtonItem) {
|
||||
func cancel(sender: UIBarButtonItem) {
|
||||
messageTextView.resignFirstResponder()
|
||||
self.dismissViewControllerAnimated(true, completion: nil)
|
||||
}
|
||||
|
||||
@@ -10,9 +10,12 @@ import UIKit
|
||||
|
||||
class FeedMediaAddCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet weak var mediaAddImage: UIImageView!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
contentView.backgroundColor = UIColor.lightGrayColor().colorWithAlphaComponent(0.5)
|
||||
mediaAddImage.tintColor = UIColor.yepTintColor()
|
||||
contentView.backgroundColor = UIColor.yepBackgroundColor()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
@@ -13,17 +13,23 @@
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="feed_media_add" translatesAutoresizingMaskIntoConstraints="NO" id="wLD-ko-O7n">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="feed_media_add" translatesAutoresizingMaskIntoConstraints="NO" id="wLD-ko-O7n">
|
||||
<rect key="frame" x="25" y="25" width="30" height="30"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstItem="wLD-ko-O7n" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="L6z-rD-aF6"/>
|
||||
<constraint firstItem="wLD-ko-O7n" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="ibY-N2-mvO"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="100" height="93"/>
|
||||
<connections>
|
||||
<outlet property="mediaAddImage" destination="wLD-ko-O7n" id="eHD-Jg-fzA"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="184" y="241.5"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
|
||||
Reference in New Issue
Block a user