Layout and Push Fix
This commit is contained in:
@@ -58,6 +58,8 @@ public partial class OptionsViewModel : ObservableObject
|
||||
public bool IsNotificationsTabSelected => SelectedTab == OptionsTab.Notifications;
|
||||
public bool IsDataManagementTabSelected => SelectedTab == OptionsTab.DataManagement;
|
||||
|
||||
public string NotificationVibrationButtonText => NotificationVibrationEnabled ? "Aktiv" : "Inaktiv";
|
||||
|
||||
public IAsyncRelayCommand DeleteAllDataCommand { get; }
|
||||
public IAsyncRelayCommand SaveAppearanceCommand { get; }
|
||||
public IAsyncRelayCommand ResetAppearanceCommand { get; }
|
||||
@@ -74,6 +76,7 @@ public partial class OptionsViewModel : ObservableObject
|
||||
public IAsyncRelayCommand<NotificationScheduleItemViewModel> DeleteScheduleCommand { get; }
|
||||
public IAsyncRelayCommand SaveDatabaseLocationCommand { get; }
|
||||
public IAsyncRelayCommand ClearExportsCommand { get; }
|
||||
public IRelayCommand ToggleNotificationVibrationCommand { get; }
|
||||
public IRelayCommand ShowAppearanceTabCommand { get; }
|
||||
public IRelayCommand ShowNotificationsTabCommand { get; }
|
||||
public IRelayCommand ShowDataManagementTabCommand { get; }
|
||||
@@ -118,6 +121,11 @@ public partial class OptionsViewModel : ObservableObject
|
||||
SaveDatabaseLocationCommand = new AsyncRelayCommand(SaveDatabaseLocationAsync);
|
||||
ClearExportsCommand = new AsyncRelayCommand(ClearExportsAsync);
|
||||
|
||||
ToggleNotificationVibrationCommand = new RelayCommand(() =>
|
||||
{
|
||||
NotificationVibrationEnabled = !NotificationVibrationEnabled;
|
||||
});
|
||||
|
||||
ShowAppearanceTabCommand = new RelayCommand(() => SelectedTab = OptionsTab.Appearance);
|
||||
ShowNotificationsTabCommand = new RelayCommand(() => SelectedTab = OptionsTab.Notifications);
|
||||
ShowDataManagementTabCommand = new RelayCommand(() => SelectedTab = OptionsTab.DataManagement);
|
||||
@@ -135,6 +143,11 @@ public partial class OptionsViewModel : ObservableObject
|
||||
OnPropertyChanged(nameof(IsDataManagementTabSelected));
|
||||
}
|
||||
|
||||
partial void OnNotificationVibrationEnabledChanged(bool value)
|
||||
{
|
||||
OnPropertyChanged(nameof(NotificationVibrationButtonText));
|
||||
}
|
||||
|
||||
public async Task LoadAsync()
|
||||
{
|
||||
await LoadAppearanceAsync();
|
||||
@@ -447,7 +460,10 @@ public partial class OptionsViewModel : ObservableObject
|
||||
var granted = await _notificationScheduler.EnsurePermissionAsync();
|
||||
if (!granted)
|
||||
{
|
||||
StatusText = "Benachrichtigungsberechtigung wurde nicht erlaubt.";
|
||||
StatusText = OperatingSystem.IsAndroidVersionAtLeast(31)
|
||||
? "Bitte Benachrichtigungen und exakte Alarme erlauben und danach erneut speichern."
|
||||
: "Benachrichtigungsberechtigung wurde nicht erlaubt.";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -530,4 +546,4 @@ public partial class OptionsViewModel : ObservableObject
|
||||
Notifications,
|
||||
DataManagement
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user