                                             return
                                         }
 
+                                        var messageIDs = [String]()
+
+                                        realm.beginWrite()
+
                                         if let yepTeam = yepTeamFromDiscoveredUser(discoveredUser, inRealm: realm) {
-                                            syncSocialWorkPiece(SocialWorkPiece.Github(repo), yepTeam: yepTeam, inRealm: realm)
+                                            messageIDs += messageIDsFromSyncSocialWorkPiece(SocialWorkPiece.Github(repo), yepTeam: yepTeam, inRealm: realm)
                                         }
+
+                                        let _ = try? realm.commitWrite()
+
+                                        // 通知更新 UI
+                                        tryPostNewMessagesReceivedNotificationWithMessageIDs(messageIDs, messageAge: .New)
                                     }
                                 })
                             }
                         }
+
+                        let _ = try? realm.commitWrite()
+
+                        // 通知更新 UI
+                        tryPostNewMessagesReceivedNotificationWithMessageIDs(messageIDs, messageAge: .New)
                     }
                 })
             }

                        guard let realm = try? Realm() else {
                            return
                        }

                        // 同步最新的几个
                        var i = 0

                            }

                            if let yepTeam = userWithUsername(yepTeamUsername, inRealm: realm) {
                                messageIDs += messageIDsFromSyncSocialWorkPiece(SocialWorkPiece.Github(repo), yepTeam: yepTeam, inRealm: realm)

                            } else {
                                discoverUserByUsername(yepTeamUsername, failureHandler: nil, completion: { discoveredUser in
