Refactor, rename the concept of "download media" to "download assets", including related mentions

This commit is contained in:
Tyrrrz
2022-10-29 17:39:53 +03:00
parent 1131f8659d
commit 560a069c35
18 changed files with 168 additions and 120 deletions

View File

@@ -186,8 +186,8 @@ public class DashboardViewModel : PropertyChangedBase
dialog.Before?.Pipe(Snowflake.FromDate),
dialog.PartitionLimit,
dialog.MessageFilter,
dialog.ShouldDownloadMedia,
_settingsService.ShouldReuseMedia,
dialog.ShouldDownloadAssets,
_settingsService.ShouldReuseAssets,
_settingsService.DateFormat
);

View File

@@ -59,7 +59,7 @@ public class ExportSetupViewModel : DialogScreen
? MessageFilter.Parse(MessageFilterValue)
: MessageFilter.Null;
public bool ShouldDownloadMedia { get; set; }
public bool ShouldDownloadAssets { get; set; }
public bool IsAdvancedSectionDisplayed { get; set; }
@@ -72,7 +72,7 @@ public class ExportSetupViewModel : DialogScreen
SelectedFormat = _settingsService.LastExportFormat;
PartitionLimitValue = _settingsService.LastPartitionLimitValue;
MessageFilterValue = _settingsService.LastMessageFilterValue;
ShouldDownloadMedia = _settingsService.LastShouldDownloadMedia;
ShouldDownloadAssets = _settingsService.LastShouldDownloadAssets;
// Show the "advanced options" section by default if any
// of the advanced options are set to non-default values.
@@ -81,7 +81,7 @@ public class ExportSetupViewModel : DialogScreen
Before != default ||
!string.IsNullOrWhiteSpace(PartitionLimitValue) ||
!string.IsNullOrWhiteSpace(MessageFilterValue) ||
ShouldDownloadMedia != default;
ShouldDownloadAssets != default;
}
public void ToggleAdvancedSection() => IsAdvancedSectionDisplayed = !IsAdvancedSectionDisplayed;
@@ -92,7 +92,7 @@ public class ExportSetupViewModel : DialogScreen
_settingsService.LastExportFormat = SelectedFormat;
_settingsService.LastPartitionLimitValue = PartitionLimitValue;
_settingsService.LastMessageFilterValue = MessageFilterValue;
_settingsService.LastShouldDownloadMedia = ShouldDownloadMedia;
_settingsService.LastShouldDownloadAssets = ShouldDownloadAssets;
// If single channel - prompt file path
if (IsSingleChannel)

View File

@@ -38,10 +38,10 @@ public class SettingsViewModel : DialogScreen
set => _settingsService.ParallelLimit = Math.Clamp(value, 1, 10);
}
public bool ShouldReuseMedia
public bool ShouldReuseAssets
{
get => _settingsService.ShouldReuseMedia;
set => _settingsService.ShouldReuseMedia = value;
get => _settingsService.ShouldReuseAssets;
set => _settingsService.ShouldReuseAssets = value;
}
public SettingsViewModel(SettingsService settingsService) =>