private async void ModifyCommandHelper(string action)
        {
            // Restore values. Ensures non null.
            if (PersistenceSerializer.TryFetchConfig(out PiHoleConfig config))
            {
                await PiholeStateFunctions.ModifyHelper(action, "", false, config);

                Console.WriteLine("Completed 3D touch disable.");
                MessagingCenter.Send(Current, "RefreshDashboard");
                return;
            }

            Console.WriteLine("Tried to do 3D touch StopCommand, but failed.");
            return;
        }
Beispiel #2
0
 async void Disable_Clicked(object sender, EventArgs e) => RespondToModify(await PiholeStateFunctions.ModifyHelper("disable", "", isBackupSelected, config), "Filter disabled.");
Beispiel #3
0
 async void Disable300_Clicked(object sender, EventArgs e) => RespondToModify(await PiholeStateFunctions.ModifyHelper("disable", "300", isBackupSelected, config), "Disabled for 5 minutes");