Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 9 Rev 11
Línea 19... Línea 19...
19
    
19
    
20
 
20
 
-
 
21
    
-
 
22
    init(topicUuid : String, preview : Bool = false)
21
    
23
    {
22
    init(topicUuid : String, preview : Bool = false)
24
        
23
    {
25
        let appData = appDao.selectOne()
24
        self.preview = preview
26
        self.preview = preview
25
        if(preview) {
27
        if(preview) {
Línea 52... Línea 54...
52
 
54
 
Línea 53... Línea 55...
53
    
55
    
54
    var body: some View {
-
 
-
 
56
    var body: some View {
55
 
57
 
56
        Button(action: {
58
        Button(action: {
57
     
59
            var appData = appDao.selectOne()
-
 
60
            appData.topicUuidActive = self.viewModel.topic.uuid
58
            appData.topicUuidActive = self.viewModel.topic.uuid
61
            appData.capsuleUuidActive = ""
59
            appData.capsuleUuidActive = ""
62
            appData.slideUuidActive = ""
Línea -... Línea 63...
-
 
63
            
60
            appData.slideUuidActive = ""
64
            print("update query : 4")
Línea 61... Línea 65...
61
            appData.subPageSource = AppData.SUB_PAGE_SOURCE_TOPICS
65
            appDao.update(model: appData)
Línea 112... Línea 116...
112
                    .stroke(Color("color_card_view_border"), lineWidth:1)
116
                    .stroke(Color("color_card_view_border"), lineWidth:1)
113
            )
117
            )
114
            .padding(.horizontal, 5)
118
            .padding(.horizontal, 5)
115
        } .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_CHANGE_PERCENTAJE_COMPLETED_TOPIC))
119
        } .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_CHANGE_PERCENTAJE_COMPLETED_TOPIC))
116
        { data in
120
        { data in
-
 
121
            let appData =  appDao.selectOne()
117
            if data.userInfo != nil {
122
            if data.userInfo != nil {
118
                if let topicUuid = data.userInfo?["topicUuid"]! as? String {
123
                if let topicUuid = data.userInfo?["topicUuid"]! as? String {
119
                    if !topicUuid.isEmpty && topicUuid == self.viewModel.topic.uuid {
124
                    if !topicUuid.isEmpty && topicUuid == self.viewModel.topic.uuid {
120
                        self.viewModel.fetchProgress(topicUuid: topicUuid, userUuid: appData.userUuid)
125
                        self.viewModel.fetchProgress(topicUuid: topicUuid, userUuid: appData.userUuid)