lilcodelab / Xamarin.Plugin.Calendar

Calendar plugin for Xamarin.Forms
MIT License
260 stars 60 forks source link

Event indicator shows issue #22

Closed StefanVam closed 4 years ago

StefanVam commented 4 years ago

I have saw closed issue #8 ,but when i used calender plugin,i still encounter this problem.Is There something wrong when i use.Below is my code

protected async override void OnAppearing()
        {
                ...
                var data = (await GetMonthDayData(userId,DateTime.Now)).Data;
                data.ForEach(x => {
                    if((x.customerList!=null)&&(x.customerList.Count>0))
                    {
                        calendar.Events.Add(x.Date, x.customerList);
                    }
               ...
        }

In iOS,when i lanch app through cold start,event indicator which assigned in async onappearing method seems not to show on the initial time.After initialization,event indicator will show if I swipe left or right. In Android,this problem just occur occasionally.

StefanVam commented 4 years ago

I think the issue is caused by async

PenguinPero commented 4 years ago

@jsabic will take a look into it

jsabic commented 4 years ago

I could not reproduce the issue.

I've tried the following things:

Every case crashes the app. Make sure you did not do any of the above.