Skip to content
This repository was archived by the owner on Nov 13, 2020. It is now read-only.
This repository was archived by the owner on Nov 13, 2020. It is now read-only.

Loader Not Stopping #4

@saadupwork

Description

@saadupwork

Hi,

I am using your pull to refresh extension.
When I pull its not going back to its original place. Loader keeps loading.

NavigationView{
            List{

 ForEach(0..<self.dataSource.myModel.count, id: \.self){ index in
                    SelectionCell(title: self.dataSource.myModel[index].titles, date: self.dataSource.myModel[index].startDates, phoneNumber: "", message: self.dataSource.myModel[index].titles, selectedItem: self.$selectedItem, beforetext: self.$beforetext, aftertext: self.$aftertext, showtitle: self.$showtitle)
                }

 .onPull(perform: {
                
                print("isLoading OnPull is : \(self.isLoading)")
                self.isLoading = false
                DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
                    self.dataSource.myModel = []
                    self.dataSource.getCalendarEvents()
                    //self.dataSource.sortModelWithRespectToDate()
                    self.isLoading = true
                }
            }, isLoading: self.isLoading)
                
                
                .navigationBarTitle("AGENDA")
                .navigationBarHidden(false)

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions