mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-09 04:46:35 +10:00
Merge branch 'develop' of https://github.com/CatchChat/Yep into develop
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ PODS:
|
||||
- MZFayeClient (1.0.1):
|
||||
- Base64 (~> 1.0.1)
|
||||
- SocketRocket (~> 0.4)
|
||||
- Navi (0.3.8)
|
||||
- Navi (0.3.9)
|
||||
- pop (1.0.8)
|
||||
- Proposer (0.7.1)
|
||||
- Realm (0.96.2):
|
||||
@@ -67,7 +67,7 @@ SPEC CHECKSUMS:
|
||||
Kingfisher: b39315e9dbed7e8ffe73a9ca1be2ee006d1d57e4
|
||||
MonkeyKing: 9be24307843a80f4cd3eca66adc12c67aefb83bb
|
||||
MZFayeClient: 65e7ef67e61fbe7a7a8b196130541c9f06bcb5d8
|
||||
Navi: fd0be0452eacbaa3c0b2a8c815dbc9c08e059ce9
|
||||
Navi: 24f5c81aeb46b89d27168ec1d459581230ae2675
|
||||
pop: bb773ae2c791ca2629de13b347e7a8b450fa6a57
|
||||
Proposer: e9759ad71a6702fd94315a0bff1f8c116edf6f07
|
||||
Realm: 3ce8448151c571e90b85002d984d7f93f54fc8a3
|
||||
|
||||
@@ -477,7 +477,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
conversations.forEach { conversation in
|
||||
if let latestMessage = conversation.messages.last, user = latestMessage.fromFriend {
|
||||
let userAvatar = UserAvatar(userID: user.userID, avatarStyle: miniAvatarStyle)
|
||||
AvatarPod.wakeAvatar(userAvatar, completion: { _ ,_ in })
|
||||
AvatarPod.wakeAvatar(userAvatar, completion: { _ , _, _ in })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ class ImageCache {
|
||||
cacheSize = deviceSize
|
||||
}
|
||||
|
||||
let attachmentOriginKey = "attachment-\(attachmentURL.absoluteString)"
|
||||
let attachmentOriginKey = "attachment-0.0-0.0-\(attachmentURL.absoluteString)"
|
||||
|
||||
let attachmentSizeKey = "attachment-\(cacheSize)-\(attachmentURL.absoluteString)"
|
||||
let attachmentSizeKey = "attachment-\(cacheSize.width)-\(cacheSize.height)-\(attachmentURL.absoluteString)"
|
||||
|
||||
let OptionsInfos: KingfisherManager.Options = (forceRefresh: false, lowPriority: false, cacheMemoryOnly: false, shouldDecode: false, queue: cacheAttachmentQueue, scale: UIScreen.mainScreen().scale)
|
||||
//查找当前 Size 的 Cache
|
||||
@@ -71,8 +71,6 @@ class ImageCache {
|
||||
})
|
||||
}
|
||||
|
||||
Kingfisher.ImageCache.defaultCache.storeImage(finalImage, forKey: attachmentSizeKey)
|
||||
|
||||
dispatch_async(dispatch_get_main_queue()) {
|
||||
completion(url: attachmentURL, image: finalImage)
|
||||
}
|
||||
@@ -94,7 +92,7 @@ class ImageCache {
|
||||
if cacheSize != CGSizeZero {
|
||||
storeImage = storeImage.resizeToTargetSize(cacheSize)
|
||||
}
|
||||
|
||||
|
||||
Kingfisher.ImageCache.defaultCache.storeImage(storeImage, originalData: UIImageJPEGRepresentation(storeImage, 1.0), forKey: attachmentSizeKey, toDisk: true, completionHandler: nil)
|
||||
|
||||
let finalImage = storeImage.decodedImage()
|
||||
|
||||
@@ -12,8 +12,8 @@ import CoreLocation
|
||||
import Kingfisher
|
||||
|
||||
let avatarFadeTransitionDuration: NSTimeInterval = 0.0
|
||||
let bigAvatarFadeTransitionDuration: NSTimeInterval = 0.2
|
||||
let imageFadeTransitionDuration: NSTimeInterval = 0.3
|
||||
let bigAvatarFadeTransitionDuration: NSTimeInterval = 0.15
|
||||
let imageFadeTransitionDuration: NSTimeInterval = 0.2
|
||||
|
||||
let MediaOptionsInfos: KingfisherOptionsInfo = [
|
||||
.Options([.BackgroundDecode, .LowPriority]),
|
||||
@@ -180,7 +180,7 @@ class YepConfig {
|
||||
|
||||
static let minTextWidth: CGFloat = 17
|
||||
|
||||
static let gapBetweenDotImageViewAndBubble: CGFloat = 5
|
||||
static let gapBetweenDotImageViewAndBubble: CGFloat = 13
|
||||
|
||||
static let gapBetweenAvatarImageViewAndBubble: CGFloat = 5
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -149,7 +149,7 @@ class ConversationsViewController: UIViewController {
|
||||
for user in normalUsers() {
|
||||
|
||||
let userAvatar = UserAvatar(userID: user.userID, avatarStyle: nanoAvatarStyle)
|
||||
AvatarPod.wakeAvatar(userAvatar, completion: { _, _ in })
|
||||
AvatarPod.wakeAvatar(userAvatar, completion: { _, _, _ in })
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,6 +10,7 @@ import UIKit
|
||||
import AVFoundation
|
||||
import MonkeyKing
|
||||
import Kingfisher
|
||||
import Ruler
|
||||
|
||||
let mediaPreviewWindow = UIWindow(frame: UIScreen.mainScreen().bounds)
|
||||
|
||||
@@ -140,19 +141,24 @@ class MediaPreviewViewController: UIViewController {
|
||||
}, completion: { [weak self] _ in
|
||||
self?.mediasCollectionView.alpha = 1
|
||||
|
||||
let fade: (() -> Void)? = { [weak self] in
|
||||
self?.topPreviewImageView.alpha = 0
|
||||
self?.bottomPreviewImageView.alpha = 0
|
||||
}
|
||||
|
||||
UIView.animateWithDuration(0.25, delay: 0.0, options: .CurveLinear, animations: { [weak self] in
|
||||
self?.mediaControlView.alpha = 1
|
||||
|
||||
}, completion: nil)
|
||||
}, completion: { _ in
|
||||
Ruler.iPhoneHorizontal(fade, nil, nil).value?()
|
||||
})
|
||||
|
||||
// 原图需要更快的显示出来,避免停留在 thumbnial 太久
|
||||
|
||||
UIView.animateWithDuration(0.1, delay: 0.0, options: .CurveLinear, animations: { [weak self] in
|
||||
self?.topPreviewImageView.alpha = 0
|
||||
self?.bottomPreviewImageView.alpha = 0
|
||||
UIView.animateWithDuration(0.1, delay: 0.1, options: .CurveLinear, animations: {
|
||||
Ruler.iPhoneHorizontal(nil, fade, fade).value?()
|
||||
|
||||
}, completion: { [weak self] _ in
|
||||
self?.showFinished = true
|
||||
println("showFinished")
|
||||
self?.showFinished = true
|
||||
println("showFinished")
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -54,7 +54,7 @@
|
||||
<animations/>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_dot_sending" id="dkr-y8-xRJ" userLabel="Dot Image View">
|
||||
<rect key="frame" x="95" y="50" width="10" height="10"/>
|
||||
<rect key="frame" x="81" y="40" width="26" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
@@ -77,7 +77,7 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_dot_sending" width="10" height="10"/>
|
||||
<image name="icon_dot_sending" width="26" height="26"/>
|
||||
<image name="icon_play" width="30" height="30"/>
|
||||
<image name="right_tail_bubble" width="48" height="40"/>
|
||||
</resources>
|
||||
|
||||
@@ -28,10 +28,11 @@ class ChatRightBaseCell: ChatBaseCell {
|
||||
dotImageView.image = UIImage(named: "icon_dot_sending")
|
||||
dotImageView.hidden = false
|
||||
|
||||
delay(0.1, work: { [weak self] in
|
||||
self?.showSendingAnimation()
|
||||
})
|
||||
|
||||
delay(0.1) { [weak self] in
|
||||
if let messageSendState = self?.messageSendState where messageSendState == .NotSend {
|
||||
self?.showSendingAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
case MessageSendState.Successed:
|
||||
dotImageView.image = UIImage(named: "icon_dot_unread")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_dot_sending" id="C9m-E2-m8h" userLabel="Dot Image View">
|
||||
<rect key="frame" x="39" y="58" width="10" height="10"/>
|
||||
<rect key="frame" x="25" y="48" width="26" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
@@ -38,6 +38,6 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_dot_sending" width="10" height="10"/>
|
||||
<image name="icon_dot_sending" width="26" height="26"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -25,7 +25,7 @@
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_dot_sending" id="eTJ-7c-9qB" userLabel="Dot Image View">
|
||||
<rect key="frame" x="46" y="56" width="10" height="10"/>
|
||||
<rect key="frame" x="32" y="41" width="26" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
@@ -53,6 +53,6 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_dot_sending" width="10" height="10"/>
|
||||
<image name="icon_dot_sending" width="26" height="26"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -25,7 +25,7 @@
|
||||
<color key="tintColor" red="0.80000001192092896" green="0.40000000596046448" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_dot_sending" id="tB7-GG-3Zd" userLabel="Dot Image View">
|
||||
<rect key="frame" x="310" y="62.5" width="10" height="10"/>
|
||||
<rect key="frame" x="308" y="52.5" width="26" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
@@ -64,6 +64,6 @@
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="bubble_right_tail" width="13" height="14"/>
|
||||
<image name="icon_dot_sending" width="10" height="10"/>
|
||||
<image name="icon_dot_sending" width="26" height="26"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
<animations/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_dot_sending" id="t6J-8M-Prm" userLabel="Dot Image View">
|
||||
<rect key="frame" x="52" y="55" width="10" height="10"/>
|
||||
<rect key="frame" x="38" y="45" width="26" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
@@ -49,7 +49,7 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_dot_sending" width="10" height="10"/>
|
||||
<image name="icon_dot_sending" width="26" height="26"/>
|
||||
<image name="icon_playvideo" width="30" height="30"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -126,7 +126,7 @@ class ProfileHeaderCell: UICollectionViewCell {
|
||||
let avatarStyle = AvatarStyle.Original
|
||||
let plainAvatar = PlainAvatar(avatarURLString: avatarURLString, avatarStyle: avatarStyle)
|
||||
|
||||
AvatarPod.wakeAvatar(plainAvatar) { [weak self] finished, image in
|
||||
AvatarPod.wakeAvatar(plainAvatar) { [weak self] finished, image, _ in
|
||||
|
||||
if finished {
|
||||
self?.blurImage(image) { blurredImage in
|
||||
|
||||
Reference in New Issue
Block a user