Removed ViewModel/Notifying concepts from INeedsLogin

No properties are actually making use of the ViewModel/[Reactive] concepts, where normal properties might change after the fact, and users might want to construct an Rx observable from a property and its changes, or a GUI might want to watch (via notifypropertychange) changes.

All concepts that are mutable and want to be followed are already able to do so without the ViewModel concepts, as the implement IObservable (IsLoggedIn, for ex)

ViewModel ideally should only be used in a GUI, as it's the weird marriage of Rx + real properties that XAML can bind to.  The ViewModel is the hybrid glue to bring those two worlds together.  In a situation with no GUI, it's unnecessary
This commit is contained in:
Justin Swanson 2020-01-04 19:01:43 -06:00
parent 5aaf416dca
commit c9f3fabd69
3 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ using System.Windows.Input;
namespace Wabbajack.Lib.Downloaders
{
public interface INeedsLogin : INotifyPropertyChanged
public interface INeedsLogin
{
ICommand TriggerLogin { get; }
ICommand ClearLogin { get; }
@ -17,6 +17,5 @@ namespace Wabbajack.Lib.Downloaders
string MetaInfo { get; }
Uri SiteURL { get; }
Uri IconUri { get; }
}
}

View File

@ -20,7 +20,7 @@ using File = Alphaleonis.Win32.Filesystem.File;
namespace Wabbajack.Lib.Downloaders
{
public class LoversLabDownloader : ViewModel, IDownloader, INeedsLogin
public class LoversLabDownloader : IDownloader, INeedsLogin
{
internal HttpClient _authedClient;

View File

@ -13,7 +13,7 @@ using Wabbajack.Lib.Validation;
namespace Wabbajack.Lib.Downloaders
{
public class NexusDownloader : ViewModel, IDownloader, INeedsLogin
public class NexusDownloader : IDownloader, INeedsLogin
{
private bool _prepared;
private SemaphoreSlim _lock = new SemaphoreSlim(1);