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
    @EnvironmentObject private var appNavigation : AppNavigation
19
    @EnvironmentObject private var appNavigation : AppNavigation
20
    @State private var goToGallery : Bool = false
20
    @State private var goToGallery : Bool = false
Línea 21... Línea 21...
21
    
21
    
22
    init(slideUuid : String, position : Int)
22
    init(slideUuid : String, position : Int)
-
 
23
    {
23
    {
24
        let appData = appDao.selectOne()
24
        self.viewModel.fetch(slideUuid: slideUuid, userUuid: appData.userUuid)
25
        self.viewModel.fetch(slideUuid: slideUuid, userUuid: appData.userUuid)
Línea 25... Línea 26...
25
        self.position = position
26
        self.position = position
26
        
27
        
Línea 34... Línea 35...
34
    
35
    
Línea 35... Línea 36...
35
 
36
 
-
 
37
    var body: some View {
36
    var body: some View {
38
 
37
 
39
        Button(action: {
38
        Button(action: {
40
            var appData = appDao.selectOne()
39
            appData.topicUuidActive = self.viewModel.slide.topicUuid
41
            appData.topicUuidActive = self.viewModel.slide.topicUuid
-
 
42
            appData.capsuleUuidActive = self.viewModel.slide.capsuleUuid
-
 
43
            appData.slideUuidActive = self.viewModel.slide.uuid
40
            appData.capsuleUuidActive = self.viewModel.slide.capsuleUuid
44
            appData.slidePositionInitial = self.position
Línea 41... Línea 45...
41
            appData.slideUuidActive = self.viewModel.slide.uuid
45
            
Línea 42... Línea 46...
42
            appData.slidePositionInitial = self.position
46
            print("update query : 9")
Línea 106... Línea 110...
106
                )
110
                )
107
                .padding(.horizontal, 5)
111
                .padding(.horizontal, 5)
108
            }
112
            }
109
            .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMPLETED_SLIDE))
113
            .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMPLETED_SLIDE))
110
            { data in
114
            { data in
-
 
115
                let appData = appDao.selectOne()
111
                if data.userInfo != nil {
116
                if data.userInfo != nil {
112
                    if let notificationSlideUuid = data.userInfo?["slideUuid"]! as? String {
117
                    if let notificationSlideUuid = data.userInfo?["slideUuid"]! as? String {
113
                        if !notificationSlideUuid.isEmpty && notificationSlideUuid == self.viewModel.slide.uuid {
118
                        if !notificationSlideUuid.isEmpty && notificationSlideUuid == self.viewModel.slide.uuid {
114
                            self.viewModel.fetchProgress(slideUuid: notificationSlideUuid, userUuid: appData.userUuid)
119
                            self.viewModel.fetchProgress(slideUuid: notificationSlideUuid, userUuid: appData.userUuid)
115
                        }
120
                        }