mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix gachalog deletion not refresh view
This commit is contained in:
@@ -636,8 +636,10 @@ internal class AdvancedCollectionView<T> : IAdvancedCollectionView<T>, INotifyPr
|
||||
view.RemoveAt(itemIndex);
|
||||
if (itemIndex <= CurrentPosition)
|
||||
{
|
||||
CurrentPosition--;
|
||||
OnPropertyChanged(nameof(CurrentItem));
|
||||
if (itemIndex == CurrentPosition--)
|
||||
{
|
||||
OnCurrentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
OnVectorChanged(new VectorChangedEventArgs(CollectionChange.ItemRemoved, itemIndex, item));
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<DataTemplate x:Key="AnnouncementTemplate">
|
||||
<ItemContainer cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||
<Border Background="{ThemeResource SystemControlAcrylicElementMediumHighBrush}" Style="{StaticResource BorderCardStyle}">
|
||||
<Border Background="{ThemeResource SystemControlAcrylicElementMediumHighBrush}" Style="{StaticResource AcrylicBorderCardStyle}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
|
||||
@@ -303,10 +303,6 @@ internal sealed partial class GachaLogViewModel : Abstraction.ViewModel
|
||||
using (await EnterCriticalSectionAsync().ConfigureAwait(false))
|
||||
{
|
||||
await gachaLogService.RemoveArchiveAsync(Archives.CurrentItem).ConfigureAwait(false);
|
||||
|
||||
// reselect first archive
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
Archives.MoveCurrentToFirst();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user