RxSwiftCommunity / RxDataSources

UITableView and UICollectionView Data Sources for RxSwift (sections, animated updates, editing ...)
MIT License
3.07k stars 485 forks source link

Align default closures with default behavior of the delegate methods #383

Closed forceunwrap closed 3 years ago

forceunwrap commented 3 years ago

Fixes https://github.com/RxSwiftCommunity/RxDataSources/issues/382

mashe commented 3 years ago

Looks reasonable. But it would break current behaviour and expectation of RxDatasource users, isn't it? Please, mark this changes as 'breaking' ones in CHANGELOG file

forceunwrap commented 3 years ago

You are right in that it changes the behavior slightly - but I would rather suspect in a non-breaking way.

I can only think of two usage scenarios as of now:

  1. Developer does use UITableView editing mode (or the previously mentioned swipe actions): One has to provide the respective closure anyway, as otherwise the editing mode wouldn't work. This means, nothing would actually change for them, because the default is being overridden.

  2. Developer does not use editing mode: One doesn't provide the closures, i.e. the new default values would take effect. Still, it wouldn't change the apps behavior, as the developer doesn't explicitly enable the table view's editing mode - making the implementation of the delegate methods irrelevant.

So really the only outcome of this change should be that one doesn't have to override the defaults, if they simply want to enable editing mode without excluding rows.

Can you think of any cases where it would break?