1
0
Fork 0

Stores: Reduce visibility of reducer functions.

master
Sebastian Kaspari 2019-08-30 15:34:39 +02:00 committed by Jeff Boek
parent 2723a55b03
commit 38d97fda8b
4 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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)
} }

View File

@ -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 }

View File

@ -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(