Merge duplicate onClose() functions in SearchBarView