For deleting the last element left  in the alarmlist

the app used to crash when the single element was deleted because of the setAlarms function not getting any content. So we create a logic not to call that function when we delete the last element left in the list