Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 24 Rev 25
Línea 110... Línea 110...
110
        }
110
        }
Línea 111... Línea 111...
111
        
111
        
Línea -... Línea 112...
-
 
112
       
-
 
113
    }
-
 
114
    
-
 
115
    public func markForViewedById(id: Int) {
-
 
116
        let userNotificationDao = UserNotificationDao.sharedInstance
-
 
117
        userNotificationDao.markViewed(id: id)
-
 
118
        
-
 
119
        var i : Int = 0
-
 
120
        var j : Int = 0
-
 
121
        while i < groups.count {
-
 
122
            while j < groups[i].notifications.count {
-
 
123
                
-
 
124
                if groups[i].notifications[j].id == id {
-
 
125
                    groups[i].notifications[j].viewed = 1
-
 
126
                }
-
 
127
                
-
 
128
                j += 1
-
 
129
            }
-
 
130
        
-
 
131
            i += 1
-
 
132
        }
-
 
133
    }
-
 
134
    
-
 
135
    public func markAllForViewedByType(command : String) {
-
 
136
        let notificationDao = UserNotificationDao()
-
 
137
        notificationDao.markViewedAllPendingByUserUuidAndCommand(userUuid: appData.userUuid, command: command)
-
 
138
        
-
 
139
        var i : Int = 0
-
 
140
        var j : Int = 0
-
 
141
        while i < groups.count {
-
 
142
            while j < groups[i].notifications.count {
-
 
143
                
-
 
144
                if groups[i].notifications[j].command == command && groups[i].notifications[j].viewed == 0 {
-
 
145
                    groups[i].notifications[j].viewed = 1
-
 
146
                }
-
 
147
                
-
 
148
                j += 1
-
 
149
            }
-
 
150
        
-
 
151
            i += 1
Línea 112... Línea 152...
112
       
152
        }