mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix broken progress bar in gallery
This commit is contained in:
parent
1cb43f894a
commit
356adf7d0e
@ -143,7 +143,7 @@ TOP:
|
||||
using (var webs = stream)
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int read_this_cycle = 0;
|
||||
int readThisCycle = 0;
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -154,7 +154,7 @@ TOP:
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (read_this_cycle == 0)
|
||||
if (readThisCycle == 0)
|
||||
throw ex;
|
||||
|
||||
if (totalRead < contentSize)
|
||||
@ -176,7 +176,7 @@ TOP:
|
||||
break;
|
||||
}
|
||||
|
||||
read_this_cycle += read;
|
||||
readThisCycle += read;
|
||||
|
||||
if (read == 0) break;
|
||||
Utils.Status($"Downloading {a.Name}", Percent.FactoryPutInRange(totalRead, contentSize));
|
||||
|
@ -197,8 +197,7 @@
|
||||
Background="{StaticResource BackgroundBrush}"
|
||||
Foreground="{StaticResource SecondaryBrush}"
|
||||
Maximum="1"
|
||||
Visibility="{Binding IsEnabled, ElementName=ExecuteButton, Converter={StaticResource bool2VisibilityHiddenConverter}, ConverterParameter=False}"
|
||||
Value="{Binding ProgressPercent, Mode=OneWay}" />
|
||||
Visibility="{Binding IsEnabled, ElementName=ExecuteButton, Converter={StaticResource bool2VisibilityHiddenConverter}, ConverterParameter=False}" />
|
||||
<TextBlock
|
||||
x:Name="MetadataDescription"
|
||||
Grid.Row="1"
|
||||
|
@ -29,10 +29,13 @@ namespace Wabbajack
|
||||
InitializeComponent();
|
||||
this.WhenActivated(dispose =>
|
||||
{
|
||||
this.MarkAsNeeded<ModListTileView, ModListMetadataVM, Percent>(this.ViewModel, x => x.ProgressPercent);
|
||||
this.MarkAsNeeded<ModListTileView, ModListMetadataVM, bool>(this.ViewModel, x => x.IsBroken);
|
||||
this.MarkAsNeeded<ModListTileView, ModListMetadataVM, bool>(this.ViewModel, x => x.Exists);
|
||||
this.MarkAsNeeded<ModListTileView, ModListMetadataVM, string>(this.ViewModel, x => x.Metadata.Links.ImageUri);
|
||||
this.WhenAny(x => x.ViewModel.ProgressPercent)
|
||||
.Select(p => p.Value)
|
||||
.BindToStrict(this, x => x.DownloadProgressBar.Value)
|
||||
.DisposeWith(dispose);
|
||||
this.WhenAny(x => x.ViewModel.Metadata.Title)
|
||||
.BindToStrict(this, x => x.DescriptionTextShadow.Text)
|
||||
.DisposeWith(dispose);
|
||||
|
Loading…
Reference in New Issue
Block a user