Skip to content

Commit

Permalink
rename VM
Browse files Browse the repository at this point in the history
  • Loading branch information
toluo-stripe committed Sep 26, 2024
1 parent 41ca2f2 commit 5181e6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.lifecycle.ViewModelProvider
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf

internal class LinkActivityViewModel : LinkViewModel<LinkState, LinkAction, LinkResult, LinkEffect>(
internal class LinkActivityViewModel : StateAndEffectsVM<LinkState, LinkAction, LinkResult, LinkEffect>(
initialState = LinkState,
) {
override fun actionToResult(action: LinkAction): Flow<LinkResult> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

internal abstract class LinkViewModel<State, Action, Result, Effect>(
internal abstract class StateAndEffectsVM<State, Action, Result, Effect>(
initialState: State,
) : ViewModel() {
private val actionChannel = Channel<Action>(Channel.UNLIMITED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.stripe.android.link.ui.signup

import com.stripe.android.link.LinkViewModel
import com.stripe.android.link.StateAndEffectsVM
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow

internal class SignUpViewModel : LinkViewModel<SignUpViewState, SignUpAction, SignUpResult, SignUpEffect>(
internal class SignUpViewModel : StateAndEffectsVM<SignUpViewState, SignUpAction, SignUpResult, SignUpEffect>(
initialState = SignUpViewState()
) {
override fun actionToResult(action: SignUpAction): Flow<SignUpResult> {
Expand Down

0 comments on commit 5181e6a

Please sign in to comment.