     var deviceToken: NSData?
     var notRegisteredPush = true
 
-    var isColdLaunch = true
+    var isFirstActive = true
 
     struct Notification {
         static let applicationDidBecomeActive = "applicationDidBecomeActive"

    func applicationDidBecomeActive(application: UIApplication) {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

        if !isColdLaunch {
            isColdLaunch = false

            if YepUserDefaults.isLogined {
                syncUnreadMessages() {
                }

        }

        NSNotificationCenter.defaultCenter().postNotificationName(Notification.applicationDidBecomeActive, object: nil)

        isFirstActive = false
    }

    func applicationWillTerminate(application: UIApplication) {
