forked from files-community/Files
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code Quality: Add Dummy update service for dev builds (files-communit…
- Loading branch information
1 parent
66212b7
commit 1886002
Showing
3 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Files.App.Services | ||
{ | ||
internal sealed class DummyUpdateService : IUpdateService | ||
{ | ||
public bool IsUpdateAvailable => false; | ||
|
||
public bool IsUpdating => false; | ||
|
||
public bool IsAppUpdated => true; | ||
|
||
public bool IsReleaseNotesAvailable => true; | ||
|
||
public event PropertyChangedEventHandler? PropertyChanged { add { } remove { } } | ||
|
||
public Task CheckAndUpdateFilesLauncherAsync() | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task CheckForUpdatesAsync() | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task CheckLatestReleaseNotesAsync(CancellationToken cancellationToken = default) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task DownloadMandatoryUpdatesAsync() | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task DownloadUpdatesAsync() | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task<string?> GetLatestReleaseNotesAsync(CancellationToken cancellationToken = default) | ||
{ | ||
// No localization for dev-only string | ||
return Task.FromResult((string?)"No release notes available for Dev build."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters