mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-27 12:46:53 +08:00
🐛 fix
This commit is contained in:
+1
-1
Submodule ref/SteamClient updated: 68e9495aa5...4cc2cfe4c9
@@ -1,6 +1,5 @@
|
||||
using BD.WTTS.Properties;
|
||||
using BD.WTTS.UI.Views.Pages;
|
||||
using BD.WTTS.UI.Views.Windows;
|
||||
|
||||
namespace BD.WTTS.Plugins;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using BD.SteamClient.Models;
|
||||
using BD.SteamClient.Models.Idle;
|
||||
using BD.SteamClient.Services;
|
||||
using BD.WTTS.UI.Views.Pages;
|
||||
using System.Linq;
|
||||
|
||||
namespace BD.WTTS.UI.ViewModels;
|
||||
|
||||
@@ -183,28 +184,20 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
|
||||
return;
|
||||
}
|
||||
|
||||
var appid_sorts = Enumerable.Empty<int>();
|
||||
switch (IdleSequentital)
|
||||
var apps = Enumerable.Empty<SteamApp>();
|
||||
apps = IdleSequentital switch
|
||||
{
|
||||
case IdleSequentital.LeastCards:
|
||||
appid_sorts = Badges.OrderBy(o => o.CardsRemaining).Select(s => s.AppId);
|
||||
break;
|
||||
case IdleSequentital.Mostcards:
|
||||
appid_sorts = Badges.OrderByDescending(o => o.CardsRemaining).Select(s => s.AppId);
|
||||
break;
|
||||
case IdleSequentital.Mostvalue:
|
||||
appid_sorts = Badges.OrderByDescending(o => o.RegularAvgPrice).Select(s => s.AppId);
|
||||
break;
|
||||
default:
|
||||
appid_sorts = Badges.Select(s => s.AppId);
|
||||
break;
|
||||
}
|
||||
IdleSequentital.LeastCards => Badges.OrderBy(o => o.CardsRemaining).Select(s => new SteamApp(s.AppId) { Name = s.AppName }),
|
||||
IdleSequentital.Mostcards => Badges.OrderByDescending(o => o.CardsRemaining).Select(s => new SteamApp(s.AppId) { Name = s.AppName }),
|
||||
IdleSequentital.Mostvalue => Badges.OrderByDescending(o => o.RegularAvgPrice).Select(s => new SteamApp(s.AppId) { Name = s.AppName }),
|
||||
_ => Badges.Select(s => new SteamApp(s.AppId) { Name = s.AppName }),
|
||||
};
|
||||
|
||||
//不应该使用 SteamConnectService 的 apps
|
||||
var apps = SteamConnectService.Current.SteamApps.Items
|
||||
.Where(x => appid_sorts.Contains((int)x.AppId))
|
||||
.OrderBy(o => appid_sorts.ToList().FindIndex(x => x == o.AppId))
|
||||
.ToList();
|
||||
//var apps = SteamConnectService.Current.SteamApps.Items
|
||||
// .Where(x => appid_sorts.Contains((int)x.AppId))
|
||||
// .OrderBy(o => appid_sorts.ToList().FindIndex(x => x == o.AppId))
|
||||
// .ToList();
|
||||
IdleGameList.Add(apps);
|
||||
}
|
||||
|
||||
@@ -236,7 +229,7 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
|
||||
if (IdleRule == IdleRule.OneThenMany)
|
||||
{
|
||||
var canIdles = Badges.Where(z => z.MinutesPlayed / 60 >= MinRunTime).Select(s => s.AppId);
|
||||
var multi = IdleGameList.Where(x => canIdles.Contains((int)x.AppId));
|
||||
var multi = IdleGameList.Where(x => canIdles.Contains(x.AppId));
|
||||
if (multi.Count() >= 1)
|
||||
{
|
||||
PauseAutoNext(false);
|
||||
@@ -251,7 +244,7 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
|
||||
else
|
||||
{
|
||||
var canIdles = Badges.Where(z => z.MinutesPlayed / 60 < MinRunTime).Select(s => s.AppId);
|
||||
var multi = IdleGameList.Where(x => canIdles.Contains((int)x.AppId));
|
||||
var multi = IdleGameList.Where(x => canIdles.Contains(x.AppId));
|
||||
if (multi.Count() >= 2)
|
||||
{
|
||||
PauseAutoNext(true);
|
||||
@@ -426,7 +419,7 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
|
||||
CancellationTokenSource.Cancel();
|
||||
return;
|
||||
}
|
||||
if (Badges.Where(x => IdleGameList.Select(s => (int)s.AppId).Contains(x.AppId)).Sum(s => s.CardsRemaining) == 0)
|
||||
if (Badges.Where(x => IdleGameList.Select(s => s.AppId).Contains(x.AppId)).Sum(s => s.CardsRemaining) == 0)
|
||||
{
|
||||
CancellationTokenSource.Cancel();
|
||||
if (IsReloaded == false)
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
Spacing="6">
|
||||
<TextBlock FontWeight="SemiBold">
|
||||
<TextBlock.Text>
|
||||
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}">
|
||||
<CompiledBinding
|
||||
Mode="OneWay"
|
||||
@@ -106,7 +105,8 @@
|
||||
<ProgressBar
|
||||
Height="10"
|
||||
Classes="Material"
|
||||
Value="50" />
|
||||
Maximum="100"
|
||||
Value="{Binding UserIdleInfo.NextLevelExpPercentage}" />
|
||||
|
||||
<Border
|
||||
Height="1"
|
||||
@@ -162,8 +162,8 @@
|
||||
Spacing="6">
|
||||
<Panel>
|
||||
<ProgressBar
|
||||
Width="100"
|
||||
Height="100"
|
||||
Width="80"
|
||||
Height="80"
|
||||
Classes="Circle"
|
||||
Value="60" />
|
||||
<TextBlock
|
||||
@@ -176,7 +176,7 @@
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
TextAlignment="Center">
|
||||
<Run FontSize="36" Text="{Binding IdleGameList.Count}" />
|
||||
<Run FontSize="24" Text="{Binding IdleGameList.Count}" />
|
||||
<Run Text=" 个游戏可掉落卡牌" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
@@ -202,7 +202,10 @@
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="spp:SteamApp">
|
||||
<Border Margin="5" spp:Animations.EnableAnimations="True">
|
||||
<spp:AppItem Title="{Binding DisplayName}" MaxHeight="150">
|
||||
<spp:AppItem
|
||||
Title="{Binding DisplayName}"
|
||||
Width="280"
|
||||
MaxHeight="150">
|
||||
<spp:AppItem.Status>
|
||||
<Border Classes="Status">
|
||||
<Panel>
|
||||
|
||||
Reference in New Issue
Block a user