1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

Fix #1745 crash on scroll of grouped collection view on iOS 15.4 beta (#1842)

This commit is contained in:
Federico Maccaroni
2022-03-14 13:49:57 -03:00
committed by GitHub
parent 612e458071
commit 4d4e246a47
4 changed files with 9 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ using Bit.Core.Enums;
using Bit.Core.Models.Domain;
using Xamarin.Forms;
using ZXing.Client.Result;
using Xamarin.CommunityToolkit.ObjectModel;
namespace Bit.App.Pages
{
@@ -79,11 +80,11 @@ namespace Bit.App.Pages
_keyConnectorService = ServiceContainer.Resolve<IKeyConnectorService>("keyConnectorService");
_clipboardService = ServiceContainer.Resolve<IClipboardService>("clipboardService");
GroupedItems = new ExtendedObservableCollection<SettingsPageListGroup>();
GroupedItems = new ObservableRangeCollection<SettingsPageListGroup>();
PageTitle = AppResources.Settings;
}
public ExtendedObservableCollection<SettingsPageListGroup> GroupedItems { get; set; }
public ObservableRangeCollection<SettingsPageListGroup> GroupedItems { get; set; }
public async Task InitAsync()
{
@@ -400,6 +401,8 @@ namespace Bit.App.Pages
public void BuildList()
{
GroupedItems.Clear();
var doUpper = Device.RuntimePlatform != Device.Android;
var autofillItems = new List<SettingsPageListItem>();
if (Device.RuntimePlatform == Device.Android)
@@ -501,7 +504,7 @@ namespace Bit.App.Pages
new SettingsPageListItem { Name = AppResources.RateTheApp },
new SettingsPageListItem { Name = AppResources.DeleteAccount }
};
GroupedItems.ResetWithRange(new List<SettingsPageListGroup>
GroupedItems.AddRange(new List<SettingsPageListGroup>
{
new SettingsPageListGroup(autofillItems, AppResources.Autofill, doUpper, true),
new SettingsPageListGroup(manageItems, AppResources.Manage, doUpper),