Show channel name if not in predefined lists

This commit is contained in:
pizzaboxer 2023-04-14 22:02:48 +02:00
parent 45f760bc14
commit 3927d58290
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -76,7 +76,13 @@ namespace Bloxstrap.ViewModels
public IEnumerable<string> Channels
{
get => _channels;
get
{
if (_channels == DeployManager.ChannelsAll && !_channels.Contains(App.Settings.Prop.Channel))
_channels = _channels.Append(App.Settings.Prop.Channel);
return _channels;
}
set => _channels = value;
}
@ -103,8 +109,12 @@ namespace Bloxstrap.ViewModels
else
{
Channels = DeployManager.ChannelsAbstracted;
Channel = DeployManager.DefaultChannel;
OnPropertyChanged(nameof(Channel));
if (!Channels.Contains(Channel))
{
Channel = DeployManager.DefaultChannel;
OnPropertyChanged(nameof(Channel));
}
}
OnPropertyChanged(nameof(Channels));