Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 24 Rev 25
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 ?? ""
Línea 173... Línea 173...
173
        let command = userInfo["command"] as? String ?? ""
173
        var command = userInfo["command"] as? String ?? ""
174
        let new_capsules = Int(userInfo["new_capsules"] as? String ?? "") ?? 0
174
        let newCapsules = Int(userInfo["new_capsules"] as? String ?? "") ?? 0
175
 
175
 
176
    
176
    
177
        if command == "signout" {
177
        if command == "signout" {
Línea 178... Línea 178...
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
        }
Línea 180... Línea 180...
180
        if command == "content-refresh" && new_capsules > 0 {
180
        if command == "content-refresh" && newCapsules > 0 {
Línea -... Línea 181...
-
 
181
            let userinfo = ["new_capsules" : String(newCapsules), "is_foreground" : (isForeground ? "1" : "0")]
-
 
182
            
-
 
183
            NotificationCenter.default.post(name: Constants.NOTIFICATION_NAME_COMMAND_REFRESH_CONTENT , object: self, userInfo: userinfo)
-
 
184
        }
-
 
185
        
-
 
186
        
-
 
187
        if !title.isEmpty && !body.isEmpty {
-
 
188
 
-
 
189
 
-
 
190
            if !url.isEmpty {
181
            let userinfo = ["new_capsules" : String(new_capsules), "is_foreground" : (isForeground ? "1" : "0")]
191
                command = Constants.NOTIFICATION_COMMAND_OPEN_URL
Línea 182... Línea 192...
182
            
192
            } else if newCapsules > 0 {