private void CatcherHelper_NotificationListSizeChanged(object sender, NotificationListSizeChangedEventArgs e)
 {
     RunOnUiThread(() =>
     {
         if (e.ThereAreNotifications)
         {
             if (clearAll != null)
             {
                 clearAll.Visibility = ViewStates.Visible;
             }
         }
         else
         {
             if (clearAll != null)
             {
                 clearAll.Visibility = ViewStates.Invisible;
             }
             if (configurationManager.RetrieveAValue(ConfigurationParameters.TurnOffScreenAfterLastNotificationCleared)
                 &&
                 ActivityLifecycleHelper.GetInstance().GetActivityState(typeof(LockScreenActivity)) == ActivityStates.Resumed)
             {
                 AwakeHelper.TurnOffScreen();
             }
         }
     });
 }
 private void CatcherHelper_NotificationListSizeChanged(object sender, NotificationListSizeChangedEventArgs e)
 {
     if (e.ThereAreNotifications)
     {
         if (clearAll != null)
         {
             clearAll.Visibility = ViewStates.Visible;
         }
     }
     else
     {
         if (clearAll != null)
         {
             clearAll.Visibility = ViewStates.Invisible;
         }
     }
 }
Beispiel #3
0
 private void OnNotificationListSizeChanged(NotificationListSizeChangedEventArgs e)
 {
     NotificationListSizeChanged?.Invoke(this, e);
 }