mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-26 12:16:07 +01:00
attempted workaround for arg outof range exception
This commit is contained in:
parent
1ef086a02c
commit
96275d8eec
@ -79,6 +79,7 @@
|
||||
</StackLayout>
|
||||
|
||||
<controls:ExtendedListView
|
||||
x:Name="_listView"
|
||||
IsVisible="{Binding ShowList}"
|
||||
ItemsSource="{Binding GroupedItems}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Controls;
|
||||
using Bit.App.Resources;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Abstractions;
|
||||
@ -26,6 +27,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
_pageName = string.Concat(nameof(GroupingsPage), "_", DateTime.UtcNow.Ticks);
|
||||
InitializeComponent();
|
||||
ListView = _listView;
|
||||
SetActivityIndicator(_mainContent);
|
||||
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
|
||||
_syncService = ServiceContainer.Resolve<ISyncService>("syncService");
|
||||
@ -57,6 +59,8 @@ namespace Bit.App.Pages
|
||||
}
|
||||
}
|
||||
|
||||
public ExtendedListView ListView { get; set; }
|
||||
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
@ -127,6 +127,7 @@ namespace Bit.App.Pages
|
||||
ShowList = false;
|
||||
ShowAddCipherButton = true;
|
||||
var groupedItems = new List<GroupingsPageListGroup>();
|
||||
var page = Page as GroupingsPage;
|
||||
|
||||
try
|
||||
{
|
||||
@ -203,7 +204,12 @@ namespace Bit.App.Pages
|
||||
ciphersListItems.Count, Device.RuntimePlatform == Device.iOS,
|
||||
!MainPage && !groupedItems.Any()));
|
||||
}
|
||||
// Workaround for https://stackoverflow.com/a/49992132/1090359
|
||||
page.ListView.HasUnevenRows = false;
|
||||
page.ListView.IsGroupingEnabled = false;
|
||||
GroupedItems.ResetWithRange(groupedItems);
|
||||
page.ListView.HasUnevenRows = true;
|
||||
page.ListView.IsGroupingEnabled = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user