Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 14 Rev 17
Línea 14... Línea 14...
14
    
14
    
15
    
15
    
16
    
-
 
-
 
16
    
Línea 17... Línea 17...
17
    private var topicName : String = ""
17
    private var topicName : String = ""
Línea 18... Línea 18...
18
    private var preview : Bool = false
18
    private var preview : Bool = false
19
    
19
    private var appData = AppData.sharedInstance
20
 
-
 
21
    private let userUuid : String
-
 
-
 
20
 
22
 
21
    private let userUuid : String
Línea 23... Línea 22...
23
    
22
 
24
    init(topicUuid : String)
23
    
25
    {
24
    init(topicUuid : String)
Línea 36... Línea 35...
36
    }
35
    }
Línea 37... Línea 36...
37
    
36
    
Línea 38... Línea 37...
38
    var body: some View {
37
    var body: some View {
39
 
-
 
40
        Button(action: {
-
 
-
 
38
 
Línea 41... Línea 39...
41
            let appDao = AppDao.sharedInstance
39
        Button(action: {
42
            var appData = appDao.selectOne()
40
            
43
            
41
            
44
            appData.topicUuidActive = self.viewModel.topic.uuid
-
 
45
            appData.capsuleUuidActive = ""
-
 
46
            appData.slideUuidActive = ""
-
 
47
            
42
            appData.topicUuidActive = self.viewModel.topic.uuid
Línea 48... Línea 43...
48
            print("update query : 4")
43
            appData.capsuleUuidActive = ""
49
            
44
            appData.slideUuidActive = ""
Línea 103... Línea 98...
103
            .padding(.horizontal, 5)
98
            .padding(.horizontal, 5)
104
        }.onAppear {
99
        }.onAppear {
105
            self.viewModel.fetchProgress(topicUuid: self.viewModel.topic.uuid, userUuid: self.userUuid)
100
            self.viewModel.fetchProgress(topicUuid: self.viewModel.topic.uuid, userUuid: self.userUuid)
Línea 106... Línea 101...
106
            
101
            
107
        }
-
 
108
        /*
-
 
109
        .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_CHANGE_PERCENTAJE_COMPLETED_TOPIC))
-
 
110
        { data in
-
 
111
            let appData =  appDao.selectOne()
-
 
112
            if data.userInfo != nil {
-
 
113
                if let topicUuid = data.userInfo?["topicUuid"]! as? String {
-
 
114
                    if !topicUuid.isEmpty && topicUuid == self.viewModel.topic.uuid {
-
 
115
                        self.viewModel.fetchProgress(topicUuid: topicUuid, userUuid: appData.userUuid)
102
        }
116
                        
-
 
117
                    }
-
 
118
                }
-
 
119
            }
-
 
120
        }*/
103
 
121
        .padding(.top, 5)
104
        .padding(.top, 5)
122
    }
105
    }