Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 11 Rev 14
Línea 23... Línea 23...
23
    @State private var showGlobalAlert : Bool = false
23
    @State private var showGlobalAlert : Bool = false
24
    @State private var titleGlobalAlert : String = ""
24
    @State private var titleGlobalAlert : String = ""
25
    @State private var messageGlobalAlert : String = ""
25
    @State private var messageGlobalAlert : String = ""
Línea 26... Línea -...
26
    
-
 
-
 
26
    
Línea 27... Línea 27...
27
    
27
    
28
    private let appDao = AppDao.sharedInstance
28
 
Línea 29... Línea -...
29
    
-
 
-
 
29
    
Línea 30... Línea 30...
30
    private var buttonShow : Bool = false
30
    private var buttonShow : Bool = false
-
 
31
    private var buttonTitle : String = ""
31
    private var buttonTitle : String = ""
32
 
-
 
33
    
-
 
34
    private let userUuid : String
32
 
35
   
Línea 58... Línea 61...
58
        } else if self.viewModel.slide.type == Constants.SLIDE_TYPE_DOCUMENT {
61
        } else if self.viewModel.slide.type == Constants.SLIDE_TYPE_DOCUMENT {
59
            self.buttonTitle = Config.LANG_BUTTON_LAUNCH_VIEW_PDF
62
            self.buttonTitle = Config.LANG_BUTTON_LAUNCH_VIEW_PDF
60
            self.buttonShow = true
63
            self.buttonShow = true
Línea 61... Línea 64...
61
            
64
            
62
        } else if self.viewModel.slide.type == Constants.SLIDE_TYPE_TEXT {
65
        } else if self.viewModel.slide.type == Constants.SLIDE_TYPE_TEXT {
63
            self.buttonTitle = Config.LANG_BUTTON_LAUNCH_VIEW_PDF
66
            self.buttonTitle = Config.LANG_BUTTON_LAUNCH_VIEW_TEXT
64
            self.buttonShow = true
67
            self.buttonShow = true
65
        } else {
68
        } else {
66
            self.buttonShow = false
69
            self.buttonShow = false
Línea 181... Línea 184...
181
 
184
 
182
                    Spacer()
185
                    Spacer()
183
                }
186
                }
Línea -... Línea 187...
-
 
187
               // .zIndex(500)
-
 
188
              
-
 
189
            }.onAppear {
-
 
190
                self.viewModel.fetchProgress(slideUuid: self.viewModel.slide.uuid, userUuid: self.userUuid)
184
               // .zIndex(500)
191
            }
185
              
192
            
186
            } .onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMPLETED_SLIDE))
193
            /*.onReceive(NotificationCenter.default.publisher(for: Constants.NOTIFICATION_NAME_COMPLETED_SLIDE))
187
            { data in
194
            { data in
188
               // print("CardGalleryView  Receive " )
195
               // print("CardGalleryView  Receive " )
189
                let appData = appDao.selectOne()
196
                let appData = appDao.selectOne()
190
                if data.userInfo != nil {
197
                if data.userInfo != nil {
191
                    if let slideUuid = data.userInfo?["slideUuid"]! as? String {
198
                    if let slideUuid = data.userInfo?["slideUuid"]! as? String {
192
                        if !slideUuid.isEmpty && slideUuid == self.viewModel.slide.uuid {
199
                        if !slideUuid.isEmpty && slideUuid == self.viewModel.slide.uuid {
193
                            self.viewModel.fetchProgress(slideUuid: slideUuid, userUuid: appData.userUuid)
200
                            self.viewModel.fetchProgress(slideUuid: slideUuid, userUuid: appData.userUuid)
194
                        }
201
                        }
-
 
202
                    }
195
                    }
203
                }
196
                }
204
             }
197
          
205
          */
198
            } .alert(isPresented: $showGlobalAlert) {
206
             .alert(isPresented: $showGlobalAlert) {
199
                Alert(
207
                Alert(
200
                    title: Text(self.titleGlobalAlert),
208
                    title: Text(self.titleGlobalAlert),
201
                    message: Text(self.messageGlobalAlert),
209
                    message: Text(self.messageGlobalAlert),