Xamarin.Form FlowListView - NullReferenceException when refresh the list











up vote
2
down vote

favorite












Steps to reproduce:



Load the collection from database or another source
Remove a item from database
Refresh the list using Pull-to-Refresh for example
Result:
App crashes.



Observations:



If the new refresh returns the same quantity of items, so the app doesn't crash;
If the new refresh returns zero items, so the app doesn't crash;
If I leave the page and navigate to it again, the error does not occur



Versions:



DLToolkit.Forms.Controls.FlowListView: 2.0.11



Xamarin.Forms: 3.4.0.1008975



Error:




11-20 23:38:07.111 I/MonoDroid(10001): System.NullReferenceException:
Object reference not set to an instance of an object. 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent
(Xamarin.Forms.DataTemplate self, System.Object item,
Xamarin.Forms.BindableObject container) [0x00000] in
D:a1sXamarin.Forms.CoreDataTemplateExtensions.cs:19 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].ActivateContent
(System.Int32 index, System.Object item) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:534 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].CreateContent
(System.Int32 index, System.Object item, System.Boolean insert)
[0x00000] in D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:543
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].GetOrCreateContent
(System.Int32 index, System.Object item) [0x00023] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:602 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].get_Item
(System.Int32 index) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:337 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellsFromPosition
(System.Int32 position, System.Int32 take) [0x0003b] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:538
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellForPosition
(System.Int32 position) [0x00000] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:453
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32
position, Android.Views.View convertView, Android.Views.ViewGroup
parent) [0x0006d] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:225
11-20 23:38:07.111 I/MonoDroid(10001): at
Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_
(System.IntPtr jnienv, System.IntPtr native__this, System.Int32
position, System.IntPtr native_convertView, System.IntPtr
native_parent) [0x00018] in <263adecfa58f4c449f1ff56156d886fd>:0 11-20
23:38:07.111 I/MonoDroid(10001): at (wrapper dynamic-method)
System.Object.287e09fa-fd7a-4426-ae0c-4254aa73f3b9(intptr,intptr,int,intptr,intptr)




Thanks in advance



Edit 1:



The code:



XAML:



<flv:FlowListView FlowColumnCount="1" SeparatorVisibility="Default" BackgroundColor="White" HasUnevenRows="True" VerticalOptions="FillAndExpand" 
FlowLoadingCommand="{Binding LoadUnreadNotificationsCommand}" FlowTotalRecords="{Binding TotalUnread}" FlowIsLoadingInfiniteEnabled="True"
FlowItemTappedCommand="{Binding NotificationSelectedCommand}" FlowIsLoadingInfinite="{Binding IsBusy}"
FlowItemsSource="{Binding UnreadNotifications}" IsPullToRefreshEnabled="True" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding LoadUnreadNotificationsCommand}">

<flv:FlowListView.FlowEmptyTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Style="{StaticResource NoData}">
<controls:FontAwesomeSolidIcon Text="{x:Static core:Icon.Unread}" Style="{StaticResource IconDashboardLabel}" HorizontalOptions="Center" FontSize="20" TextColor="#cccccc" />
<Label Text="Não existem por ler" VerticalOptions="Center" HorizontalOptions="Center" TextColor="#cccccc" />
</StackLayout>
</ViewCell>
</DataTemplate>
</flv:FlowListView.FlowEmptyTemplate>

<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<list:Card />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>

</flv:FlowListView>


C#:



public async Task LoadNotifications(bool read)
{


if (this.AcquireTapLock())
{


var notificationsResponse = await ApiManager.GetNotifications(new PaginateNotificationsModel(Settings.IdUser, read, 0, Constants.ItemsByPage, string.Empty));

if (notificationsResponse.IsSuccessStatusCode)
{
var response = await notificationsResponse.Content.ReadAsStringAsync();
var result = await Task.Run(() => JsonConvert.DeserializeObject<ListNotificationResponseModel>(response));

if (result.Status == ApiResponseStatus.Ok)
{
if (read)
{
ReadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalRead = result.CountAfterFilter;
}
else
{
UnreadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalUnread = result.CountAfterFilter;
}
}
}

IsBusy = false;
this.ReleaseTapLock();
}
}









share|improve this question
























  • Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
    – TheGeneral
    Nov 22 at 0:28










  • @TheGeneral I added some code. Thanks
    – rmlm
    Nov 22 at 0:39















up vote
2
down vote

favorite












Steps to reproduce:



Load the collection from database or another source
Remove a item from database
Refresh the list using Pull-to-Refresh for example
Result:
App crashes.



Observations:



If the new refresh returns the same quantity of items, so the app doesn't crash;
If the new refresh returns zero items, so the app doesn't crash;
If I leave the page and navigate to it again, the error does not occur



Versions:



DLToolkit.Forms.Controls.FlowListView: 2.0.11



Xamarin.Forms: 3.4.0.1008975



Error:




11-20 23:38:07.111 I/MonoDroid(10001): System.NullReferenceException:
Object reference not set to an instance of an object. 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent
(Xamarin.Forms.DataTemplate self, System.Object item,
Xamarin.Forms.BindableObject container) [0x00000] in
D:a1sXamarin.Forms.CoreDataTemplateExtensions.cs:19 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].ActivateContent
(System.Int32 index, System.Object item) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:534 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].CreateContent
(System.Int32 index, System.Object item, System.Boolean insert)
[0x00000] in D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:543
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].GetOrCreateContent
(System.Int32 index, System.Object item) [0x00023] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:602 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].get_Item
(System.Int32 index) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:337 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellsFromPosition
(System.Int32 position, System.Int32 take) [0x0003b] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:538
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellForPosition
(System.Int32 position) [0x00000] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:453
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32
position, Android.Views.View convertView, Android.Views.ViewGroup
parent) [0x0006d] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:225
11-20 23:38:07.111 I/MonoDroid(10001): at
Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_
(System.IntPtr jnienv, System.IntPtr native__this, System.Int32
position, System.IntPtr native_convertView, System.IntPtr
native_parent) [0x00018] in <263adecfa58f4c449f1ff56156d886fd>:0 11-20
23:38:07.111 I/MonoDroid(10001): at (wrapper dynamic-method)
System.Object.287e09fa-fd7a-4426-ae0c-4254aa73f3b9(intptr,intptr,int,intptr,intptr)




Thanks in advance



Edit 1:



The code:



XAML:



<flv:FlowListView FlowColumnCount="1" SeparatorVisibility="Default" BackgroundColor="White" HasUnevenRows="True" VerticalOptions="FillAndExpand" 
FlowLoadingCommand="{Binding LoadUnreadNotificationsCommand}" FlowTotalRecords="{Binding TotalUnread}" FlowIsLoadingInfiniteEnabled="True"
FlowItemTappedCommand="{Binding NotificationSelectedCommand}" FlowIsLoadingInfinite="{Binding IsBusy}"
FlowItemsSource="{Binding UnreadNotifications}" IsPullToRefreshEnabled="True" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding LoadUnreadNotificationsCommand}">

<flv:FlowListView.FlowEmptyTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Style="{StaticResource NoData}">
<controls:FontAwesomeSolidIcon Text="{x:Static core:Icon.Unread}" Style="{StaticResource IconDashboardLabel}" HorizontalOptions="Center" FontSize="20" TextColor="#cccccc" />
<Label Text="Não existem por ler" VerticalOptions="Center" HorizontalOptions="Center" TextColor="#cccccc" />
</StackLayout>
</ViewCell>
</DataTemplate>
</flv:FlowListView.FlowEmptyTemplate>

<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<list:Card />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>

</flv:FlowListView>


C#:



public async Task LoadNotifications(bool read)
{


if (this.AcquireTapLock())
{


var notificationsResponse = await ApiManager.GetNotifications(new PaginateNotificationsModel(Settings.IdUser, read, 0, Constants.ItemsByPage, string.Empty));

if (notificationsResponse.IsSuccessStatusCode)
{
var response = await notificationsResponse.Content.ReadAsStringAsync();
var result = await Task.Run(() => JsonConvert.DeserializeObject<ListNotificationResponseModel>(response));

if (result.Status == ApiResponseStatus.Ok)
{
if (read)
{
ReadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalRead = result.CountAfterFilter;
}
else
{
UnreadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalUnread = result.CountAfterFilter;
}
}
}

IsBusy = false;
this.ReleaseTapLock();
}
}









share|improve this question
























  • Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
    – TheGeneral
    Nov 22 at 0:28










  • @TheGeneral I added some code. Thanks
    – rmlm
    Nov 22 at 0:39













up vote
2
down vote

favorite









up vote
2
down vote

favorite











Steps to reproduce:



Load the collection from database or another source
Remove a item from database
Refresh the list using Pull-to-Refresh for example
Result:
App crashes.



Observations:



If the new refresh returns the same quantity of items, so the app doesn't crash;
If the new refresh returns zero items, so the app doesn't crash;
If I leave the page and navigate to it again, the error does not occur



Versions:



DLToolkit.Forms.Controls.FlowListView: 2.0.11



Xamarin.Forms: 3.4.0.1008975



Error:




11-20 23:38:07.111 I/MonoDroid(10001): System.NullReferenceException:
Object reference not set to an instance of an object. 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent
(Xamarin.Forms.DataTemplate self, System.Object item,
Xamarin.Forms.BindableObject container) [0x00000] in
D:a1sXamarin.Forms.CoreDataTemplateExtensions.cs:19 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].ActivateContent
(System.Int32 index, System.Object item) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:534 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].CreateContent
(System.Int32 index, System.Object item, System.Boolean insert)
[0x00000] in D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:543
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].GetOrCreateContent
(System.Int32 index, System.Object item) [0x00023] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:602 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].get_Item
(System.Int32 index) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:337 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellsFromPosition
(System.Int32 position, System.Int32 take) [0x0003b] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:538
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellForPosition
(System.Int32 position) [0x00000] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:453
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32
position, Android.Views.View convertView, Android.Views.ViewGroup
parent) [0x0006d] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:225
11-20 23:38:07.111 I/MonoDroid(10001): at
Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_
(System.IntPtr jnienv, System.IntPtr native__this, System.Int32
position, System.IntPtr native_convertView, System.IntPtr
native_parent) [0x00018] in <263adecfa58f4c449f1ff56156d886fd>:0 11-20
23:38:07.111 I/MonoDroid(10001): at (wrapper dynamic-method)
System.Object.287e09fa-fd7a-4426-ae0c-4254aa73f3b9(intptr,intptr,int,intptr,intptr)




Thanks in advance



Edit 1:



The code:



XAML:



<flv:FlowListView FlowColumnCount="1" SeparatorVisibility="Default" BackgroundColor="White" HasUnevenRows="True" VerticalOptions="FillAndExpand" 
FlowLoadingCommand="{Binding LoadUnreadNotificationsCommand}" FlowTotalRecords="{Binding TotalUnread}" FlowIsLoadingInfiniteEnabled="True"
FlowItemTappedCommand="{Binding NotificationSelectedCommand}" FlowIsLoadingInfinite="{Binding IsBusy}"
FlowItemsSource="{Binding UnreadNotifications}" IsPullToRefreshEnabled="True" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding LoadUnreadNotificationsCommand}">

<flv:FlowListView.FlowEmptyTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Style="{StaticResource NoData}">
<controls:FontAwesomeSolidIcon Text="{x:Static core:Icon.Unread}" Style="{StaticResource IconDashboardLabel}" HorizontalOptions="Center" FontSize="20" TextColor="#cccccc" />
<Label Text="Não existem por ler" VerticalOptions="Center" HorizontalOptions="Center" TextColor="#cccccc" />
</StackLayout>
</ViewCell>
</DataTemplate>
</flv:FlowListView.FlowEmptyTemplate>

<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<list:Card />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>

</flv:FlowListView>


C#:



public async Task LoadNotifications(bool read)
{


if (this.AcquireTapLock())
{


var notificationsResponse = await ApiManager.GetNotifications(new PaginateNotificationsModel(Settings.IdUser, read, 0, Constants.ItemsByPage, string.Empty));

if (notificationsResponse.IsSuccessStatusCode)
{
var response = await notificationsResponse.Content.ReadAsStringAsync();
var result = await Task.Run(() => JsonConvert.DeserializeObject<ListNotificationResponseModel>(response));

if (result.Status == ApiResponseStatus.Ok)
{
if (read)
{
ReadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalRead = result.CountAfterFilter;
}
else
{
UnreadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalUnread = result.CountAfterFilter;
}
}
}

IsBusy = false;
this.ReleaseTapLock();
}
}









share|improve this question















Steps to reproduce:



Load the collection from database or another source
Remove a item from database
Refresh the list using Pull-to-Refresh for example
Result:
App crashes.



Observations:



If the new refresh returns the same quantity of items, so the app doesn't crash;
If the new refresh returns zero items, so the app doesn't crash;
If I leave the page and navigate to it again, the error does not occur



Versions:



DLToolkit.Forms.Controls.FlowListView: 2.0.11



Xamarin.Forms: 3.4.0.1008975



Error:




11-20 23:38:07.111 I/MonoDroid(10001): System.NullReferenceException:
Object reference not set to an instance of an object. 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent
(Xamarin.Forms.DataTemplate self, System.Object item,
Xamarin.Forms.BindableObject container) [0x00000] in
D:a1sXamarin.Forms.CoreDataTemplateExtensions.cs:19 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].ActivateContent
(System.Int32 index, System.Object item) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:534 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].CreateContent
(System.Int32 index, System.Object item, System.Boolean insert)
[0x00000] in D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:543
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].GetOrCreateContent
(System.Int32 index, System.Object item) [0x00023] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:602 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].get_Item
(System.Int32 index) [0x00000] in
D:a1sXamarin.Forms.CoreTemplatedItemsList.cs:337 11-20
23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellsFromPosition
(System.Int32 position, System.Int32 take) [0x0003b] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:538
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellForPosition
(System.Int32 position) [0x00000] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:453
11-20 23:38:07.111 I/MonoDroid(10001): at
Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (System.Int32
position, Android.Views.View convertView, Android.Views.ViewGroup
parent) [0x0006d] in
D:a1sXamarin.Forms.Platform.AndroidRenderersListViewAdapter.cs:225
11-20 23:38:07.111 I/MonoDroid(10001): at
Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_
(System.IntPtr jnienv, System.IntPtr native__this, System.Int32
position, System.IntPtr native_convertView, System.IntPtr
native_parent) [0x00018] in <263adecfa58f4c449f1ff56156d886fd>:0 11-20
23:38:07.111 I/MonoDroid(10001): at (wrapper dynamic-method)
System.Object.287e09fa-fd7a-4426-ae0c-4254aa73f3b9(intptr,intptr,int,intptr,intptr)




Thanks in advance



Edit 1:



The code:



XAML:



<flv:FlowListView FlowColumnCount="1" SeparatorVisibility="Default" BackgroundColor="White" HasUnevenRows="True" VerticalOptions="FillAndExpand" 
FlowLoadingCommand="{Binding LoadUnreadNotificationsCommand}" FlowTotalRecords="{Binding TotalUnread}" FlowIsLoadingInfiniteEnabled="True"
FlowItemTappedCommand="{Binding NotificationSelectedCommand}" FlowIsLoadingInfinite="{Binding IsBusy}"
FlowItemsSource="{Binding UnreadNotifications}" IsPullToRefreshEnabled="True" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding LoadUnreadNotificationsCommand}">

<flv:FlowListView.FlowEmptyTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Style="{StaticResource NoData}">
<controls:FontAwesomeSolidIcon Text="{x:Static core:Icon.Unread}" Style="{StaticResource IconDashboardLabel}" HorizontalOptions="Center" FontSize="20" TextColor="#cccccc" />
<Label Text="Não existem por ler" VerticalOptions="Center" HorizontalOptions="Center" TextColor="#cccccc" />
</StackLayout>
</ViewCell>
</DataTemplate>
</flv:FlowListView.FlowEmptyTemplate>

<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<list:Card />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>

</flv:FlowListView>


C#:



public async Task LoadNotifications(bool read)
{


if (this.AcquireTapLock())
{


var notificationsResponse = await ApiManager.GetNotifications(new PaginateNotificationsModel(Settings.IdUser, read, 0, Constants.ItemsByPage, string.Empty));

if (notificationsResponse.IsSuccessStatusCode)
{
var response = await notificationsResponse.Content.ReadAsStringAsync();
var result = await Task.Run(() => JsonConvert.DeserializeObject<ListNotificationResponseModel>(response));

if (result.Status == ApiResponseStatus.Ok)
{
if (read)
{
ReadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalRead = result.CountAfterFilter;
}
else
{
UnreadNotifications = new ObservableRangeCollection<NotificationModel>(result.Notifications);
TotalUnread = result.CountAfterFilter;
}
}
}

IsBusy = false;
this.ReleaseTapLock();
}
}






c# xamarin.forms






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 at 8:44









jsanalytics

11.1k41537




11.1k41537










asked Nov 22 at 0:27









rmlm

2916




2916












  • Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
    – TheGeneral
    Nov 22 at 0:28










  • @TheGeneral I added some code. Thanks
    – rmlm
    Nov 22 at 0:39


















  • Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
    – TheGeneral
    Nov 22 at 0:28










  • @TheGeneral I added some code. Thanks
    – rmlm
    Nov 22 at 0:39
















Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
– TheGeneral
Nov 22 at 0:28




Hrm, i think i will upvote for a nicely formatted question. well done, however some code would be nice
– TheGeneral
Nov 22 at 0:28












@TheGeneral I added some code. Thanks
– rmlm
Nov 22 at 0:39




@TheGeneral I added some code. Thanks
– rmlm
Nov 22 at 0:39

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422295%2fxamarin-form-flowlistview-nullreferenceexception-when-refresh-the-list%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422295%2fxamarin-form-flowlistview-nullreferenceexception-when-refresh-the-list%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)