mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-13 14:56:03 +10:00
Add group share link and mini title
This commit is contained in:
+2
-2
@@ -52,7 +52,7 @@ DEPENDENCIES:
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
MZFayeClient:
|
||||
:path: ../CatchLib-iOS/MZFayeClient/
|
||||
:path: "../CatchLib-iOS/MZFayeClient/"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
1PasswordExtension: 676a216461ffa9189db66541b5a2465e10ae4743
|
||||
@@ -77,4 +77,4 @@ SPEC CHECKSUMS:
|
||||
SocketRocket: ee0b5c34182d37bb4f1f8d628bbe737718126daa
|
||||
TPKeyboardAvoiding: 614ebec846ec28b83d548769297fa5fb56468904
|
||||
|
||||
COCOAPODS: 0.38.2
|
||||
COCOAPODS: 0.39.0
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
848806B41B7B4E2E000C5424 /* Show.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 848806B31B7B4E2E000C5424 /* Show.storyboard */; };
|
||||
848806B61B7B4F53000C5424 /* ShowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848806B51B7B4F53000C5424 /* ShowViewController.swift */; };
|
||||
84C959891B731FD20017D3ED /* ChatBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C959881B731FD20017D3ED /* ChatBaseCell.swift */; };
|
||||
B00500D7E943DDD27CF9C562 /* Pods_Yep.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3146F0F60F2A38BC6E0FA66 /* Pods_Yep.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
B00500D7E943DDD27CF9C562 /* Pods_Yep.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3146F0F60F2A38BC6E0FA66 /* Pods_Yep.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>126</string>
|
||||
<string>127</string>
|
||||
<key>Fabric</key>
|
||||
<dict>
|
||||
<key>APIKey</key>
|
||||
|
||||
@@ -1275,6 +1275,20 @@ func friendships(completion completion: [JSONDictionary] -> Void) {
|
||||
|
||||
// MARK: - Groups
|
||||
|
||||
func groupShareLinkWithGroupID(groupID: String, failureHandler: ((Reason, String?) -> Void)?, completion: JSONDictionary -> Void) {
|
||||
let parse: JSONDictionary -> JSONDictionary? = { data in
|
||||
return data
|
||||
}
|
||||
|
||||
let resource = authJsonResource(path: "/api/v1/circles/\(groupID)/share", method: .POST, requestParameters: [:], parse: parse)
|
||||
|
||||
if let failureHandler = failureHandler {
|
||||
apiRequest({_ in}, baseURL: baseURL, resource: resource, failure: failureHandler, completion: completion)
|
||||
} else {
|
||||
apiRequest({_ in}, baseURL: baseURL, resource: resource, failure: defaultFailureHandler, completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
func groupWithGroupID(groupID groupID: String, failureHandler: ((Reason, String?) -> Void)?, completion: JSONDictionary -> Void) {
|
||||
|
||||
let parse: JSONDictionary -> JSONDictionary? = { data in
|
||||
|
||||
@@ -504,12 +504,18 @@ class ConversationViewController: BaseViewController {
|
||||
joinGroup(groupID: groupID, failureHandler: nil, completion: {
|
||||
|
||||
println("joined group: \(groupID)")
|
||||
|
||||
groupShareLinkWithGroupID(groupID, failureHandler: { (reason, error) -> Void in
|
||||
|
||||
}, completion: { (link) -> Void in
|
||||
print(link)
|
||||
})
|
||||
|
||||
syncMessages()
|
||||
|
||||
dispatch_async(dispatch_get_main_queue()) {
|
||||
FayeService.sharedManager.subscribeGroup(groupID: groupID)
|
||||
}
|
||||
|
||||
FayeService.sharedManager.subscribeGroup(groupID: groupID)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -672,7 +678,9 @@ class ConversationViewController: BaseViewController {
|
||||
|
||||
// 进来时就尽快标记已读
|
||||
|
||||
batchMarkMessagesAsReaded(updateOlderMessagesIfNeeded: true)
|
||||
delay(0.5) { [weak self] in
|
||||
self?.batchMarkMessagesAsReaded(updateOlderMessagesIfNeeded: true)
|
||||
}
|
||||
|
||||
// MARK: Notify Typing
|
||||
|
||||
|
||||
@@ -36,8 +36,10 @@ class FeedConversationsViewController: UIViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = NSLocalizedString("Joined Feeds", comment: "")
|
||||
title = NSLocalizedString("Feeds", comment: "")
|
||||
|
||||
// navigationItem.backBarButtonItem?.title = NSLocalizedString("Feeds", comment: "")
|
||||
|
||||
realm = try! Realm()
|
||||
|
||||
feedConversationsTableView.registerNib(UINib(nibName: feedConversationCellID, bundle: nil), forCellReuseIdentifier: feedConversationCellID)
|
||||
|
||||
Reference in New Issue
Block a user