Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 40 | Rev 44 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 40 Rev 43
Línea 168... Línea 168...
168
        
168
        
169
        
169
        
170
        let title = alertDict["title"]  as? String ?? ""
170
        let title = alertDict["title"]  as? String ?? ""
-
 
171
        let body = alertDict["body"]  as? String ?? ""
171
        let body = alertDict["body"]  as? String ?? ""
172
        let url = userInfo["url"] as? String ?? ""
172
        let url = userInfo["url"] as? String ?? ""
173
        
173
        let command = userInfo["command"] as? String ?? ""
-
 
174
        let newCapsules = Int(userInfo["new_capsules"] as? String ?? "") ?? 0
174
        let newCapsules = userInfo.index(forKey: "new_capsules") == nil ? 0 : Int(userInfo["new_capsules"] as? String ?? "") ?? 0
175
 
175
        let command = userInfo.index(forKey: "command") == nil ? "" : userInfo["command"] as? String ?? ""
176
    
176
        
177
        if command == "signout" {
177
        if command == "signout" {
178
            NotificationCenter.default.post(name: Constants.NOTIFICATION_NAME_COMMAND_EXIT , object: self, userInfo: nil)
178
            NotificationCenter.default.post(name: Constants.NOTIFICATION_NAME_COMMAND_EXIT , object: self, userInfo: nil)
179
        }
179
        }