Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 39 Rev 40
Línea 119... Línea 119...
119
 
119
 
120
        }
120
        }
121
        .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMMAND_REFRESH_CONTENT))
121
        .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMMAND_REFRESH_CONTENT))
122
        { data in
122
        { data in
-
 
123
            if data.userInfo != nil {
-
 
124
                let userInfo = data.userInfo!
-
 
125
                //userInfo["command"] as? String ?? ""
123
            if data.userInfo != nil {
126
                
124
                let newCapsules = Int(data.userInfo?["new_capsules"]! as? String ?? "0") ?? 0
127
                let newCapsules = Int(userInfo["new_capsules"] as? String ?? "") ?? 0
Línea 125... Línea 128...
125
                let isForeground = (Int(data.userInfo?["is_foreground"]! as? String ?? "0") ?? 0) == 1
128
                let isForeground = (Int(userInfo["is_foreground"] as? String ?? "") ?? 0) == 1
126
                
129
                
127
                if newCapsules > 0 {
130
                if newCapsules > 0 {
Línea 128... Línea 131...
128
                    let title = data.userInfo?["title"]! as? String ?? ""
131
                    let title = userInfo?["title"] as? String ?? ""
129
                    let body = data.userInfo?["body"]! as? String ?? ""
132
                    let body = userInfo?["body"] as? String ?? ""
130
                    
133
                    
131
                    let command = Constants.NOTIFICATION_COMMAND_REFRESH_CONTENT
134
                    let command = Constants.NOTIFICATION_COMMAND_REFRESH_CONTENT