Skip to content

Commit

Permalink
fix: alternative sources toggle not being applied everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAabedKhan committed Feb 19, 2024
1 parent 417d77e commit a631342
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/services/manager_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class ManagerAPI {

Future<File?> downloadPatches() async {
try {
final String repoName = getPatchesRepo();
final String repoName = !isUsingAlternativeSources() ? defaultPatchesRepo : getPatchesRepo();
final String currentVersion = await getCurrentPatchesVersion();
final String url = getPatchesDownloadURL();
return await _githubAPI.getPatchesReleaseFile(
Expand All @@ -438,7 +438,7 @@ class ManagerAPI {

Future<File?> downloadIntegrations() async {
try {
final String repoName = getIntegrationsRepo();
final String repoName = !isUsingAlternativeSources() ? defaultIntegrationsRepo : getIntegrationsRepo();
final String currentVersion = await getCurrentIntegrationsVersion();
final String url = getIntegrationsDownloadURL();
return await _githubAPI.getPatchesReleaseFile(
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/views/settings/settings_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class SettingsViewModel extends BaseViewModel {

void useAlternativeSources(bool value) {
_managerAPI.useAlternativeSources(value);
_managerAPI.setCurrentPatchesVersion('0.0.0');
_managerAPI.setCurrentIntegrationsVersion('0.0.0');
notifyListeners();
}

Expand Down

0 comments on commit a631342

Please sign in to comment.