-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose RecyclerBinder's Commit Policy through DynamicConfig
Summary: # Problem Today we don't have the ability to modify any configurations we set to the `RecyclerBinder` once they have been initialized. We don't want to allow all the configurations to be mutable, but `rangeRatio` and `commitPolicy` should be allowed to change throughout a production's interaction. # Solution Expose the configurations we allow to change through `DynamicConfig`. Today I'm only going to allow `commitPolicy` to be modified. I recommend that the configuration changed to be exposed through `RecyclerCollectionComponent` through `Trigger`. Reviewed By: astreet Differential Revision: D16674728 fbshipit-source-id: 89277591adddcaae9dc23fcbf905c3e069410fd9
- Loading branch information
1 parent
1171ae0
commit ac513f3
Showing
9 changed files
with
130 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...s-widget/src/main/java/com/facebook/litho/sections/widget/RecyclerDynamicConfigEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2019-present Facebook, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.facebook.litho.sections.widget; | ||
|
||
import com.facebook.litho.annotations.Event; | ||
import com.facebook.litho.widget.RecyclerBinder.CommitPolicy; | ||
|
||
/** | ||
* An event that is triggered when a new set of configurations, which are allowed to be dynamic, is | ||
* applied to {@link com.facebook.litho.sections.SectionTree.Target}. | ||
*/ | ||
@Event | ||
public class RecyclerDynamicConfigEvent { | ||
public @CommitPolicy int commitPolicy; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters