Automatically hide empty menu items

When a three dot menu is empty, it should be automatically removed from the App