Stores: Reduce visibility of reducer functions.
This commit is contained in:
parent
2723a55b03
commit
38d97fda8b
|
@ -53,7 +53,7 @@ sealed class QuickActionSheetAction : BrowserFragmentAction() {
|
||||||
* A top level reducer that receives the current [BrowserFragmentState] and an [Action] and then delegates to the proper child
|
* A top level reducer that receives the current [BrowserFragmentState] and an [Action] and then delegates to the proper child
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
fun browserStateReducer(
|
private fun browserStateReducer(
|
||||||
state: BrowserFragmentState,
|
state: BrowserFragmentState,
|
||||||
action: BrowserFragmentAction
|
action: BrowserFragmentAction
|
||||||
): BrowserFragmentState {
|
): BrowserFragmentState {
|
||||||
|
|
|
@ -36,7 +36,7 @@ data class ExceptionsFragmentState(val items: List<ExceptionsItem>) : State
|
||||||
/**
|
/**
|
||||||
* The ExceptionsState Reducer.
|
* The ExceptionsState Reducer.
|
||||||
*/
|
*/
|
||||||
fun exceptionsStateReducer(state: ExceptionsFragmentState, action: ExceptionsFragmentAction): ExceptionsFragmentState {
|
private fun exceptionsStateReducer(state: ExceptionsFragmentState, action: ExceptionsFragmentAction): ExceptionsFragmentState {
|
||||||
return when (action) {
|
return when (action) {
|
||||||
is ExceptionsFragmentAction.Change -> state.copy(items = action.list)
|
is ExceptionsFragmentAction.Change -> state.copy(items = action.list)
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ sealed class BookmarkFragmentAction : Action {
|
||||||
* @param action the action to perform
|
* @param action the action to perform
|
||||||
* @return the new bookmarks state
|
* @return the new bookmarks state
|
||||||
*/
|
*/
|
||||||
fun bookmarkFragmentStateReducer(state: BookmarkFragmentState, action: BookmarkFragmentAction): BookmarkFragmentState {
|
private fun bookmarkFragmentStateReducer(state: BookmarkFragmentState, action: BookmarkFragmentAction): BookmarkFragmentState {
|
||||||
return when (action) {
|
return when (action) {
|
||||||
is BookmarkFragmentAction.Change -> {
|
is BookmarkFragmentAction.Change -> {
|
||||||
val items = state.mode.selectedItems.filter { it in action.tree }
|
val items = state.mode.selectedItems.filter { it in action.tree }
|
||||||
|
|
|
@ -63,7 +63,7 @@ sealed class SearchFragmentAction : Action {
|
||||||
/**
|
/**
|
||||||
* The SearchState Reducer.
|
* The SearchState Reducer.
|
||||||
*/
|
*/
|
||||||
fun searchStateReducer(state: SearchFragmentState, action: SearchFragmentAction): SearchFragmentState {
|
private fun searchStateReducer(state: SearchFragmentState, action: SearchFragmentAction): SearchFragmentState {
|
||||||
return when (action) {
|
return when (action) {
|
||||||
is SearchFragmentAction.SearchShortcutEngineSelected ->
|
is SearchFragmentAction.SearchShortcutEngineSelected ->
|
||||||
state.copy(
|
state.copy(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user