small bug fixes
This commit is contained in:
+16
-12
@@ -1,29 +1,33 @@
|
||||
namespace cfs_tracker.Services;
|
||||
namespace cfs_tracker.Services;
|
||||
|
||||
public static class ExportUiHelper
|
||||
{
|
||||
public static async Task ShowExportSavedActionsAsync(ExportResult result)
|
||||
{
|
||||
var action = await Shell.Current.DisplayActionSheetAsync(
|
||||
$"Export gespeichert:\n{result.FileName}",
|
||||
"Schließen",
|
||||
null,
|
||||
"Öffnen",
|
||||
"Teilen");
|
||||
var closeText = LocalizationService.Translate("Options_Export_ActionClose");
|
||||
var openText = LocalizationService.Translate("Options_Export_ActionOpen");
|
||||
var shareText = LocalizationService.Translate("Options_Export_ActionShare");
|
||||
|
||||
if (action == "Öffnen")
|
||||
var action = await Shell.Current.DisplayActionSheetAsync(
|
||||
LocalizationService.Format("Options_Export_ActionsTitle", result.FileName),
|
||||
closeText,
|
||||
null,
|
||||
openText,
|
||||
shareText);
|
||||
|
||||
if (action == openText)
|
||||
{
|
||||
await Launcher.Default.OpenAsync(new OpenFileRequest(
|
||||
"Export öffnen",
|
||||
LocalizationService.Translate("Options_Export_OpenTitle"),
|
||||
new ReadOnlyFile(result.FilePath)));
|
||||
}
|
||||
else if (action == "Teilen")
|
||||
else if (action == shareText)
|
||||
{
|
||||
await Share.Default.RequestAsync(new ShareFileRequest
|
||||
{
|
||||
Title = "Export teilen",
|
||||
Title = LocalizationService.Translate("Options_Export_ShareTitle"),
|
||||
File = new ShareFile(result.FilePath)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user