Working tabSelected with Database list seze instead of boolean itemAdded