Options fix
clean up and fixes - Heute gefixt - Code Cleanup NotificationScheduleItemViewModel -fixed NotificationScheduleItemViewModel for Windows compat push implementation Push fixes Push benachrichtungen eingebaut - Status bei push - Push auch in background - Toggle für symtome angepasst push system change exporter update Optionen fix - Optionen aufgeteilt auf 3 tabs - Anpassungen haben jetzt Farbslider Optimierung fix
This commit is contained in:
@@ -1,9 +1,57 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using cfs_tracker.Services;
|
||||
|
||||
namespace cfs_tracker;
|
||||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
||||
|
||||
[Activity(
|
||||
Theme = "@style/Maui.SplashTheme",
|
||||
MainLauncher = true,
|
||||
LaunchMode = LaunchMode.SingleTop,
|
||||
ConfigurationChanges = ConfigChanges.ScreenSize
|
||||
| ConfigChanges.Orientation
|
||||
| ConfigChanges.UiMode
|
||||
| ConfigChanges.ScreenLayout
|
||||
| ConfigChanges.SmallestScreenSize
|
||||
| ConfigChanges.Density)]
|
||||
public class MainActivity : MauiAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle? savedInstanceState){ base.OnCreate(savedInstanceState); }
|
||||
}
|
||||
protected override void OnCreate(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
HandleNotificationIntent(Intent);
|
||||
}
|
||||
|
||||
protected override void OnNewIntent(Android.Content.Intent? intent)
|
||||
{
|
||||
base.OnNewIntent(intent);
|
||||
if (intent is not null)
|
||||
HandleNotificationIntent(intent);
|
||||
}
|
||||
|
||||
private static void HandleNotificationIntent(Android.Content.Intent? intent)
|
||||
{
|
||||
if (intent is null)
|
||||
return;
|
||||
|
||||
var route = intent.GetStringExtra(Platforms.Android.AndroidNotificationScheduler.ExtraRoute);
|
||||
if (!string.Equals(route, "quickentry", StringComparison.OrdinalIgnoreCase))
|
||||
return;
|
||||
|
||||
var dateText = intent.GetStringExtra(Platforms.Android.AndroidNotificationScheduler.ExtraDate);
|
||||
var status = intent.GetStringExtra(Platforms.Android.AndroidNotificationScheduler.ExtraStatus);
|
||||
var commit = intent.GetBooleanExtra(Platforms.Android.AndroidNotificationScheduler.ExtraCommit, false);
|
||||
|
||||
if (!DateTime.TryParse(dateText, out var date))
|
||||
date = DateTime.Today;
|
||||
|
||||
var services = IPlatformApplication.Current?.Services;
|
||||
var navigator = services?.GetService(typeof(NotificationNavigationService)) as NotificationNavigationService;
|
||||
if (navigator is null)
|
||||
return;
|
||||
|
||||
navigator.QueueQuickEntry(date, status, commit);
|
||||
_ = navigator.FlushAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user