Refined logic for hiding actionbar items in a tab after delete