mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-01 13:04:02 +01:00
ac-1425 added main thread invocations when updating the vault properties to fix cases where the screen stays blank and doesn't update (#2604)
This commit is contained in:
parent
6d7970f767
commit
cd9e49b13b
@ -330,13 +330,16 @@ namespace Bit.App.Pages
|
|||||||
items.AddRange(itemGroup);
|
items.AddRange(itemGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Device.RuntimePlatform == Device.iOS)
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
// HACK: [PS-536] Fix to avoid blank list after back navigation on unlocking with previous page info
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
// because of update to XF v5.0.0.2401
|
{
|
||||||
GroupedItems.Clear();
|
// HACK: [PS-536] Fix to avoid blank list after back navigation on unlocking with previous page info
|
||||||
}
|
// because of update to XF v5.0.0.2401
|
||||||
GroupedItems.ReplaceRange(items);
|
GroupedItems.Clear();
|
||||||
|
}
|
||||||
|
GroupedItems.ReplaceRange(items);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -356,21 +359,24 @@ namespace Bit.App.Pages
|
|||||||
items.AddRange(itemGroup);
|
items.AddRange(itemGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupedItems.Any())
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
if (Device.RuntimePlatform == Device.iOS)
|
if (groupedItems.Any())
|
||||||
|
{
|
||||||
|
if (Device.RuntimePlatform == Device.iOS)
|
||||||
|
{
|
||||||
|
// HACK: [PS-536] Fix to avoid blank list after back navigation on unlocking with previous page info
|
||||||
|
// because of update to XF v5.0.0.2401
|
||||||
|
GroupedItems.Clear();
|
||||||
|
}
|
||||||
|
GroupedItems.ReplaceRange(new List<IGroupingsPageListItem> { new GroupingsPageHeaderListItem(groupedItems[0].Name, groupedItems[0].ItemCount) });
|
||||||
|
GroupedItems.AddRange(items);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// HACK: [PS-536] Fix to avoid blank list after back navigation on unlocking with previous page info
|
|
||||||
// because of update to XF v5.0.0.2401
|
|
||||||
GroupedItems.Clear();
|
GroupedItems.Clear();
|
||||||
}
|
}
|
||||||
GroupedItems.ReplaceRange(new List<IGroupingsPageListItem> { new GroupingsPageHeaderListItem(groupedItems[0].Name, groupedItems[0].ItemCount) });
|
});
|
||||||
GroupedItems.AddRange(items);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GroupedItems.Clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -378,9 +384,12 @@ namespace Bit.App.Pages
|
|||||||
_doingLoad = false;
|
_doingLoad = false;
|
||||||
Loaded = true;
|
Loaded = true;
|
||||||
Loading = false;
|
Loading = false;
|
||||||
ShowNoData = (MainPage && !HasCiphers) || !groupedItems.Any();
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
ShowList = !ShowNoData;
|
{
|
||||||
DisableRefreshing();
|
ShowNoData = (MainPage && !HasCiphers) || !groupedItems.Any();
|
||||||
|
ShowList = !ShowNoData;
|
||||||
|
DisableRefreshing();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user