Only deselect a table cell if it doesn't want to keep its selection, i.e. as long as data_cell[:keep_selection] is not true

This commit is contained in:
Jochen Schäfer
2013-10-15 13:29:54 +02:00
parent 305de48628
commit 0ffb05a088

View File

@@ -205,7 +205,7 @@ module ProMotion
def tableView(table_view, didSelectRowAtIndexPath:index_path)
data_cell = @promotion_table_data.cell(index_path: index_path)
table_view.deselectRowAtIndexPath(index_path, animated: true)
table_view.deselectRowAtIndexPath(index_path, animated: true) unless data_cell[:keep_selection] == true
data_cell[:arguments] ||= {}
data_cell[:arguments][:cell] = data_cell if data_cell[:arguments].is_a?(Hash) # TODO: Should we really do this?