Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 11 Rev 17
Línea 8... Línea 8...
8
import SwiftUI
8
import SwiftUI
Línea 9... Línea 9...
9
 
9
 
Línea 10... Línea 10...
10
struct CommentAndRatingCommentListItem: View {
10
struct CommentAndRatingCommentListItem: View {
11
    
-
 
-
 
11
    
Línea 12... Línea 12...
12
    var comment : CommentAndRatingComment
12
    var comment : CommentAndRatingComment
13
    
13
    let onDelete: () -> Void
14
    
14
    
15
    var body: some View {
15
    var body: some View {
Línea 55... Línea 55...
55
                     
55
                     
Línea 56... Línea 56...
56
                        Spacer()
56
                        Spacer()
Línea 57... Línea 57...
57
                        
57
                        
58
                        if !comment.link_delete.isEmpty {
-
 
59
                        
-
 
60
                            Button(action: {
-
 
61
                                
-
 
62
                                NotificationCenter.default.post(
-
 
63
                                    name:Constants.NOTIFICATION_NAME_COMMAND_DELETE_COMMENT,
-
 
64
                                    object: nil,
-
 
65
                                    userInfo: ["id" : comment.id, "link_delete" : comment.link_delete])
58
                        if !comment.link_delete.isEmpty {
66
                                
59
                        
67
                            }, label: {
60
                            Button(action:  onDelete, label: {
68
                                Image(systemName: "trash")
61
                                Image(systemName: "trash")
69
                                    .resizable()
62
                                    .resizable()
Línea 126... Línea 119...
126
    static var comment = CommentAndRatingComment(
119
    static var comment = CommentAndRatingComment(
127
        date: "2022-07-28T10:00:00", image: "", fullname: "Santiago Olivera", rating: 3.8, comment: "Comentario de prueba", link_delete: "LINK"
120
        date: "2022-07-28T10:00:00", image: "", fullname: "Santiago Olivera", rating: 3.8, comment: "Comentario de prueba", link_delete: "LINK"
128
    )
121
    )
Línea 129... Línea 122...
129
    
122
    
130
    static var previews: some View {
123
    static var previews: some View {
-
 
124
        CommentAndRatingCommentListItem(comment: comment) {
-
 
125
            
131
        CommentAndRatingCommentListItem(comment: comment)
126
        }
132
    }
127
    }